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QUxVRVMgKAoJCQkJCQkJCSAgICcgLiAkZXZlbnQgLiAnLAoJCQkJCQkJCSAgICInIC4gJHVwbG9hZF9uYW1lIC4gJyIsIAoJCQkJCQkJCSAgICInIC4gJHVwbG9hZF90eXBlIC4gJyIsIAoJCQkJCQkJCSAgICInIC4gJHVwbG9hZF9zaXplIC4gJyIsIAoJCQkJCQkJCSAgICInIC4gJHVwbG9hZF9kYXRhIC4gJyIKCQkJCQkJCQkgICApCgkJCQkJCQkJICAnOwoJCSNlY2hvKCRzcWxfYXR0YWNobWVudF9xdWVyeSk7IAoJCWZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbF9hdHRhY2htZW50X3F1ZXJ5KTsgCgkJPz4KCQk8c2NyaXB0IGxhbmd1YWdlPSJqYXZhc2NyaXB0Ij4KCQlvcGVuZXIuUmVsb2FkRXZlbnREZXRhaWxBdHRhY2htZW50cyAoKTsKCQlzZWxmLmNsb3NlICgpOwoJCTwvc2NyaXB0PgoJCQoJCTw/CgkJIAoJfSAKfSAvLyBlbmQgdXBsb2FkIGZpbGUgaGFuZGxlciAKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBnZW5lcmljX2RhdGEoJHNlcnZlciwkdXNlciwkcGFzc3dvcmQsJGRhdGFiYXNlLCRxdWVyeSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGdsb2JhbCAkZmF0YWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAvKiBBY2Nlc3NpbmcgU1FMLVNlcnZlciBhbmQgcXVlcnlpbmcgdGFibGUgKi8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBNWVNRTF9DT05ORUNUKCRzZXJ2ZXIsICR1c2VyLCAkcGFzc3dvcmQpIG9yIGRpZSAoICRmYXRhbC4iIFNlcnZlciAkc2VydmVyIHVucmVhY2hhYmxlICR1c2VyLyRwYXNzd29yZCIgKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIE1ZU1FMX1NFTEVDVF9EQigkZGF0YWJhc2UpIG9yIGRpZSAoICRmYXRhbC4iIERhdGFiYXNlIHVucmVhY2hhYmxlIiApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcmVzdWx0ID0gQE1ZU1FMX1FVRVJZKHN0cmlwc2xhc2hlcygkcXVlcnkpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICBpZiAoJHJlc3VsdCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBwcmludCAoIjwveG1wPjxpbWcgc3JjPSdodHRwOi8vd3d3LmN5YmVyOC5uZXQvd2Vic2VydmljZXMvaW1hZ2VzL2V4cGxvcmVyL2V4Y2xhbWF0aW9uLmdpZicgYWxpZ249dG9wPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgPGI+QSBmYXRhbCBNeVNRTCBlcnJvciBvY2N1cmVkPC9iPi5cbjxiciAvPlF1ZXJ5Ojx4bXA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgIiAuICRxdWVyeSAuICI8L3htcD48YnIgLz5cbkVycm9yOiAoIiAuIG15c3FsX2Vycm5vKCkgLiAiKSA8eG1wPiIgLiBteXNxbF9lcnJvcigpIC4gIjwveG1wPjxicj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIDxBIEhSRUY9J2phdmFzY3JpcHQ6aGlzdG9yeS5iYWNrKCknPlBsZWFzZSB0cnkgYWdhaW48L0E+Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBNWVNRTF9DTE9TRSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGV4aXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuICRyZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIE1ZU1FMX0NMT1NFKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHF1ZXJ5KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkkZGF0YWJhc2U9ImRiMjYxNDMxMDY4IjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJJHNlcnZlcj0iZGIxNzA3LnBlcmZvcmEubmV0IiA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJJHVzZXI9ImRibzI2MTQzMTA2OCI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCSRwYXNzd29yZD0id0o1OGFGWWMiIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIHJldHVybiBnZW5lcmljX2RhdGEoJHNlcnZlciwkdXNlciwkcGFzc3dvcmQsJGRhdGFiYXNlLCRxdWVyeSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKPz4=","ZWItY29ubmVjdG9yLnBocA=="=>"PD8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIApkZWZpbmUgKCJSRUNVUlNFX1RZUEVfREFJTFkiLCAiMCIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmRlZmluZSAoIlJFQ1VSU0VfVFlQRV9XRUVLTFkiLCAiMSIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmRlZmluZSAoIlJFQ1VSU0VfVFlQRV9NT05USExZX0RBVEUiLCAiMiIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmRlZmluZSAoIlJFQ1VSU0VfVFlQRV9NT05USExZX0RBWSIsICIzIik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZGVmaW5lICgiUkVDVVJTRV9UWVBFX1lFQVJMWSIsICI0Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZGVmaW5lICgiUkVDVVJTRV9UWVBFX1dFRUtEQVkiLCAiNSIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmRlZmluZSAoIlJFQ1VSU0VfVFlQRV9DVVNUT00iLCAiNyIpOyAgICAgICAgICAgIApkZWZpbmUgKCJHTE9CQUxfQ09ORklHIiwgImViLWNvbmZpZy50eHQiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmlmIChpc3NldCgkSFRUUF9SQVdfUE9TVF9EQVRBKSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRpbnB1dCA9ICRIVFRQX1JBV19QT1NUX0RBVEE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9IGVsc2UgaWYgKHN0cmxlbigkSFRUUF9QT1NUX1ZBUlNbImlucHV0Il0pPjApIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkaW5wdXQgPSBzdHJpcHNsYXNoZXMoJEhUVFBfUE9TVF9WQVJTWyJpbnB1dCJdKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gZWxzZSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGlucHV0ID0gaW1wbG9kZSgiXHJcbiIsIGZpbGUoJ3BocDovL2lucHV0JykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKaWYgKGlzc2V0KCRfR0VUWyd2J10pKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGFycj1leHBsb2RlICgnLycsJF9HRVRbJ3YnXSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoJGU9MDskZTxzaXplb2YoJGFycik7JGUrPTIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRfR0VUWyRhcnJbJGVdXT0kYXJyWyRlKzFdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgokYWN0aW9uPSRfR0VUWydhY3Rpb24nXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokaWQ9JF9HRVRbJ2lkJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKJHMxPSRfR0VUWydzMSddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiRzMj0kX0dFVFsnczInXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokdHA9JF9HRVRbJ3RwJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKJHVpPSRfR0VUWyd1aSddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiRybT0kX0dFVFsncm0nXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokbm09JF9HRVRbJ25tJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKJHVzPSRfR0VUWyd1cyddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgoKaWYgKGlzc2V0KCRfR0VUWydjYWxlbmRhcnMnXSkpICAgICAgICAgCnsgICAgCglpZiAoaXNzZXQoJF9HRVRbJ29ubHknXSkpCgl7CgkJaWYgKCRhY3Rpb249PSdyb29tbGlzdCcpCgkJewoJCQkkbG9jYWxfZGF0YSA9IGV2ZW50X3Jvb21fbGlzdCgkaWQpOyAKCQkgICAgZWNobyAnUk9PTUxJU1RfREFUQT0iJyAuIHN0cl9yZXBsYWNlICgnIicsICcmcXVvdGU7JywgJGxvY2FsX2RhdGEpIC4gJyI7JzsgICAgCgkJCWV4aXQ7CgkJfQoJCWlmICgkYWN0aW9uPT0ncmFuZ2UnKQoJCXsKCQkJJGxvY2FsX2RhdGEgPSBkYXRlX3JhbmdlKCRpZCk7IAoJCSAgICBlY2hvICdEQVRFTElTVF9EQVRBPSInIC4gc3RyX3JlcGxhY2UgKCciJywgJyZxdW90ZTsnLCAkbG9jYWxfZGF0YSkgLiAnIjsnOyAgICAKCQkJZXhpdDsKCQl9CgkJJGxvY2F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ZW50aWQgKyAnL2NhbGVuZGFycy8nICsgdGhpcy5pZCArICcvb25seS9kYXRhJzsgIDsKICAgICAgICAgICAgICAgIHZhciBvbkxvYWRIYW5kbGVyID0gZnVuY3Rpb24gKCkgCiAgICAgICAgICAgICAgICB7IAogICAgICAgICAgICAgICAgICAgIFJPT01MSVNUX0RBVEE9Uk9PTUxJU1RfREFUQS5yZXBsYWNlKC8mcXVvdGU7L2csJyInKTsKICAgICAgICAgICAgICAgICAgICBST09NTElTVF9EQVRBPVJPT01MSVNUX0RBVEEucmVwbGFjZSgvJmFtcDsvZywnJicpOwogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5ldmVudGNhbGVuZGFyLm9uZGV0YWlsIChST09NTElTVF9EQVRBLCB0cnVlKTsgCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhcHBsaWNhdGlvbi5hZGQgKHVybCwgb25Mb2FkSGFuZGxlcik7IAogICAgICAgICAgICB9CgkKICAgICAgICAgICAgY2FsZW5kYXIuZ2V0ZGF0ZXMgPSBmdW5jdGlvbiAoaWQpCiAgICAgICAgICAgIHsgCiAgICAgICAgICAgICAgICB2YXIgdXJsID0gREFUQV9VUkwrJ2FjdGlvbi9yYW5nZS9pZC8nICsgdGhpcy5ldmVudGlkICsgJy9jYWxlbmRhcnMvJyArIHRoaXMuaWQgKyAnL29ubHkvZGF0YSc7ICA7CiAgICAgICAgICAgICAgICB2YXIgb25Mb2FkSGFuZGxlciA9IGZ1bmN0aW9uICgpIAogICAgICAgICAgICAgICAgeyAKICAgICAgICAgICAgICAgICAgICBEQVRFTElTVF9EQVRBPURBVEVMSVNUX0RBVEEucmVwbGFjZSgvJnF1b3RlOy9nLCciJyk7CiAgICAgICAgICAgICAgICAgICAgd2luZG93LmV2ZW50Y2FsZW5kYXIub25kYXRlc2xvYWRlZCAoREFURUxJU1RfREFUQSwgdHJ1ZSk7IAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYXBwbGljYXRpb24uYWRkICh1cmwsIG9uTG9hZEhhbmRsZXIpOyAKICAgICAgICAgICAgfQogICAgICAgICAgICAKICAgICAgICAgICAgY2FsZW5kYXIuaW52b2tlID0gZnVuY3Rpb24gKCkKICAgICAgICAgICAgewogICAgICAgICAgICAJdGhpcy53cml0ZSAoJzxpbWcgc3JjPSInICsgTE9DQVRJT05fUEFUSF9OQU1FICsgJ2JldmVsL3BpbndoZWVsLXcuZ2lmIj48YnI+TG9hZGluZyAnICsgCiAgICAgICAgICAgICAgICAJamRhdGUoJ00gaiwgWScsIHRoaXMuZGF0ZSkgKyAKICAgICAgICAgICAgICAgICAgICAnIGV2ZW50cyBmb3IgJyArIHRoaXMuY2FsZW5kYXJfbmFtZSArICcuLi4nLCB0cnVlKTsKICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIHRoaXMudGltZXN0YW1wLnNlbnQgPSBuZXcgRGF0ZSgpOwogICAgICAgICAgICAJdGhpcy5xdWVyeXN0cmluZygpOwogICAgICAgICAgICAJdmFyIHJlbW90ZV91cmwgPSB0aGlzLnJlbW90ZSArICcvb25seS9kYXRhJzsgCiAgICAgICAgICAgICAgICB2YXIgb25Mb2FkSGFuZGxlciA9IGZ1bmN0aW9uICgpIAogICAgICAgICAgICAgICAgeyAKICAgICAgICAgICAgICAgICAgICBDQUxFTkRBUl9EQVRBPUNBTEVOREFSX0RBVEEucmVwbGFjZSgvJnF1b3RlOy9nLCciJyk7CiAgICAgICAgICAgICAgICAgICAgQ0FMRU5EQVJfREFUQT1DQUxFTkRBUl9EQVRBLnJlcGxhY2UoLyZhbXA7L2csJyYnKTsKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZXZlbnRjYWxlbmRhci5kcmF3IChDQUxFTkRBUl9EQVRBLCBudWxsLCB0cnVlKTsgCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhcHBsaWNhdGlvbi5hZGQgKHJlbW90ZV91cmwsIG9uTG9hZEhhbmRsZXIpOyAKICAgICAgICAgICAgfQogICAgICAgICAgICA8PyBpZiAoaXNzZXQoJF9HRVRbJ3ZpZXcnXSkpIGVjaG8gJ2NhbGVuZGFyLmNhbGVuZGFyX3ZpZXc9RXZlbnRDYWxlbmRhci5NSU5JOyc7ID8+IAogICAgICAgICAgICBjYWxlbmRhci5pbnZva2UgKCk7CiAgICAgICAgfSAKCQkKICAgICAgICBhcHBsaWNhdGlvbi5vbmxvYWRlZCAgID0gZnVuY3Rpb24gKCkgIAogICAgICAgIHsgIAogICAgICAgIAkgTE9DQVRJT05fUEFUSF9OQU1FID0gIjw/PSAkcmVtb3RlX3VybCA/PiI7CiAgICAgICAgICAgICBEQVRBX1VSTD1MT0NBVElPTl9QQVRIX05BTUUgKyAiZGF0YWJhc2UvIjsKICAgICAgICAgICAgIExvYWRQdWJsaWNDYWxlbmRhckZyb21SZW1vdGUgKCkgOwogICAgICAgIH0KICAgICAgICAKICAgICAgICBhcHBsaWNhdGlvbi5iZWdpbigpOyA8PyAKCX0KCWV4aXQ7IAp9ICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAppZiAoaXNzZXQoJF9HRVRbJ3JzcyddKSkgICAgICAgICAKeyAgICAgICAgIAogICAgJGh0bT1pbXBsb2RlICgnJywgZmlsZSAoJ2h0dHA6Ly9zcHJlYWRzaGVldHMuZ29vZ2xlLmNvbS9mZWVkcy9saXN0L28wMjEzOTE2NTM3Mjg5Mjc1MzEyMy4zODMxNDYyNDI1OTYzNjQ5MTMwL29kNy9wdWJsaWMvYmFzaWM/YWx0PXJzcycpKTsKICAgIGhlYWRlciAoJ0NvbnRlbnQtVHlwZTogdGV4dC94bWwnKTsKICAgIGVjaG8gJGh0bTsgICAgZXhpdDsgICAgIAp9ICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmlmIChpc3NldCgkX0dFVFsndmlldyddKSkgICAgICAgICAKeyAgICAgICAgIAogICAgJGZpbGU9c3RyX3JlcGxhY2UgKCctJywnLycsJF9HRVRbJ3ZpZXcnXSk7CglpZiAoIWZpbGVfZXhpc3RzKCRmaWxlKSkgeyBlY2hvICRmaWxlIC4gJyBkb2VzIG5vdCBleGlzdCc7IGV4aXQ7IH0gCgkkZnA9Zm9wZW4gKCRmaWxlLCdyJyk7CgkkaHRtPWZyZWFkKCRmcCxmaWxlc2l6ZSgkZmlsZSkpOwoJZmNsb3NlKCRmcCk7CiAgICBoZWFkZXIgKCdDb250ZW50LVR5cGU6IHRleHQveG1sJyk7CiAgICBlY2hvICRodG07ICAgIGV4aXQ7ICAgICAKfSAgICAgICAgIAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiRkYXRhYmFzZT0iZGIxMDYyMjgxNDIiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiRzZXJ2ZXI9ImRiMTA0LnBlcmZvcmEubmV0IiA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokdXNlcj0iZGJvMTA2MjI4MTQyIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokcGFzc3dvcmQ9IlZkc1UuSDVFIiA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGdldF9pbnN0YWxsX2RpciAoKQp7IAoJJGluc3RhbGxkaXIgPSBleHBsb2RlICgnLycsICRfU0VSVkVSWydTQ1JJUFRfTkFNRSddKTsKCWFycmF5X3BvcCAoJGluc3RhbGxkaXIpOwoJcmV0dXJuIGltcGxvZGUgKCcvJywgJGluc3RhbGxkaXIpOyAKfQoKZnVuY3Rpb24gZ2VuZXJpY19kYXRhKCRzZXJ2ZXIsJHVzZXIsJHBhc3N3b3JkLCRkYXRhYmFzZSwkcXVlcnkpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBnbG9iYWwgJGZhdGFsOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgLyogQWNjZXNzaW5nIFNRTC1TZXJ2ZXIgYW5kIHF1ZXJ5aW5nIHRhYmxlICovICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgTVlTUUxfQ09OTkVDVCgkc2VydmVyLCAkdXNlciwgJHBhc3N3b3JkKSBvciBkaWUgKCAkZmF0YWwuIiBTZXJ2ZXIgJHNlcnZlciB1bnJlYWNoYWJsZSAkdXNlci8kcGFzc3dvcmQiICk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBNWVNRTF9TRUxFQ1RfREIoJGRhdGFiYXNlKSBvciBkaWUgKCAkZmF0YWwuIiBEYXRhYmFzZSB1bnJlYWNoYWJsZSIgKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHJlc3VsdCA9IEBNWVNRTF9RVUVSWShzdHJpcHNsYXNoZXMoJHF1ZXJ5KSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgaWYgKCRyZXN1bHQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgcHJpbnQgKCI8ZXJyb3I+PCFbQ0RBVEFbPHhtcD48aW1nIHNyYz0naHR0cDovL3d3dy5jeWJlcjgubmV0L3dlYnNlcnZpY2VzL2ltYWdlcy9leHBsb3Jlci9leGNsYW1hdGlvbi5naWYnIGFsaWduPXRvcD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIDxiPkEgZmF0YWwgTXlTUUwgZXJyb3Igb2NjdXJlZDwvYj4uXG48YnIgLz5RdWVyeTo8eG1wPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICIgLiAkcXVlcnkgLiAiPC94bXA+PGJyIC8+XG5FcnJvcjogKCIgLiBteXNxbF9lcnJubygpIC4gIikgPHhtcD4iIC4gbXlzcWxfZXJyb3IoKSAuICI8L3htcD48YnI+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICA8QSBIUkVGPSdqYXZhc2NyaXB0Omhpc3RvcnkuYmFjaygpJz5QbGVhc2UgdHJ5IGFnYWluPC9BPl1dPjwvZXJyb3I+Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBNWVNRTF9DTE9TRSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGV4aXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuICRyZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIE1ZU1FMX0NMT1NFKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHF1ZXJ5KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgZ2xvYmFsICRzZXJ2ZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIGdsb2JhbCAkdXNlcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgZ2xvYmFsICRwYXNzd29yZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgZ2xvYmFsICRkYXRhYmFzZTsgICAgICAKICAgCiAgICRmcD1mb3BlbiAoR0xPQkFMX0NPTkZJRywncicpOwogICAkZnI9ZnJlYWQgKCRmcCwgZmlsZXNpemUoR0xPQkFMX0NPTkZJRykpOwogICBmY2xvc2UgKCRmcCk7CiAgIGZvcmVhY2ggKGV4cGxvZGUgKCJcbiIsJGZyKSBhcyAkbGluZSkKICAgewoJCXBhcnNlX3N0cigkbGluZSk7IAogICB9CiAgICRzZXJ2ZXIgCQk9ICRjb25maWcgWydzZXJ2ZXInXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICR1c2VyIAkJPSAkY29uZmlnIFsndXNlciddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgJHBhc3N3b3JkIAk9ICRjb25maWcgWydwYXNzd29yZCddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgJGRhdGFiYXNlCT0gJGNvbmZpZyBbJ2RhdGFiYXNlJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICByZXR1cm4gZ2VuZXJpY19kYXRhKCRzZXJ2ZXIsJHVzZXIsJHBhc3N3b3JkLCRkYXRhYmFzZSwkcXVlcnkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCgpmdW5jdGlvbiBldmVudF9yb29tX2xpc3QgKCRpZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcmVzdWx0ID0gZm9ybV9kYXRhYmFzZV9xdWVyeSgnc2VsZWN0IGVyLnJvb21mayxyb29tbmFtZSBmcm9tIGV2ZW50X3Jvb21zIGVyIGlubmVyIGpvaW4gcm9vbXMgciBvbiBlci5yb29tZms9ci5pZCB3aGVyZSBlci5ldmVudGZrPScuJGlkLicnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR4bWw9JzxyZWNvcmRzZXQgZm9yPSJbJyAuICRpZCAuICddIj4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgd2hpbGUoJHJvdyA9bXlzcWxfZmV0Y2hfcm93KCRyZXN1bHQpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHhtbC49JzxyZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPGZpZWxkIG5hbWU9InJvb21mayI+Jy4kcm93WzBdLic8L2ZpZWxkPic7ICAgICAgICAgICAgCiAgICAgICAgJHhtbC49JzxmaWVsZCBuYW1lPSJyb29tbmFtZSI+PCFbQ0RBVEFbJy4gICRyb3dbMV0gIC4nXV0+PC9maWVsZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPC9yZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhtbC49JzwvcmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAkeG1sOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBwcm9wX2xpc3QgKCRpZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcmVzdWx0ID0gZm9ybV9kYXRhYmFzZV9xdWVyeSgnc2VsZWN0IGNwLnByb3BuYW1lLCBjcC5wcm9wdmFsdWUsIGVwLnByb3BlcnR5X2VhY2ggICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20gY3VzdG9tcHJvcGVydGllcyBjcCBsZWZ0IG91dGVyIGpvaW4gZWJwX2V2ZW50X3Byb3BlcnRpZXMgZXAgb24gICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNwLnByb3BuYW1lPWVwLnByb3BlcnR5X25hbWUgd2hlcmUgZXZlbnRmaz0nLiRpZC4nJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkeG1sPSc8cmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB3aGlsZSgkcm93ID1teXNxbF9mZXRjaF9yb3coJHJlc3VsdCkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPHJlY29yZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICR4bWwuPSc8ZmllbGQgbmFtZT0icHJvcG5hbWUiPicuJHJvd1swXS4nPC9maWVsZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHhtbC49JzxmaWVsZCBuYW1lPSJwcm9wdmFsdWUiPicuJHJvd1sxXS4nPC9maWVsZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICR4bWwuPSc8ZmllbGQgbmFtZT0icHJvcGVhY2giPicuJHJvd1syXS4nPC9maWVsZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPC9yZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhtbC49JzwvcmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAkeG1sOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBzZXRfY29uZmlnICgkZG9tKSAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgCiAgICAkY29uZmlnID0gYXJyYXkgKCk7ICAgICAgICAgICAgICAgIAogICAgZm9yZWFjaCAoc2VsZWN0X25vZGVzICgkZG9tLCAnLy9maWVsZCcpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGNvbmZpZ1tdID0gJ2NvbmZpZ1snIC4gJGZpZWxkLT5nZXRfYXR0cmlidXRlICgnbmFtZScpIC4gJ109JyAuICRmaWVsZC0+Z2V0X2NvbnRlbnQgKCkgLiAnJzsgI2NvbmZpZ1tkZWZhdWx0cm9vbV09MzE5ICAgICAgICAgCiAgICB9ICAgICAgICAgICAgIAogICAgcHJpbnRfciAoJGNvbmZpZyk7ICAgICAgICAgCiAgICAkZnA9Zm9wZW4oR0xPQkFMX0NPTkZJRywidyIpOyAgICAgICAgIAogICAgZndyaXRlKCRmcCxpbXBsb2RlKCJcbiIsJGNvbmZpZykpOyAgICAgICAgIAogICAgZmNsb3NlKCRmcCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBnZXRfY29uZmlnICgpICAgICAgICAgCnsgICAgICAgICAKICAgICRjb25maWcgPSBhcnJheSAoKTsgICAgICAgICAKICAgICRmcD1mb3BlbihHTE9CQUxfQ09ORklHLCJyIik7ICAgICAgICAgCiAgICAkZnI9ZnJlYWQoJGZwLGZpbGVzaXplKEdMT0JBTF9DT05GSUcpKTsgICAgICAgICAKICAgIGZjbG9zZSgkZnApOyAgICAgICAgIAogICAgJGZyPWV4cGxvZGUoIlxuIiwkZnIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKCRmciBhcyAkZikgcGFyc2Vfc3RyKCRmKTsgICAgICAgICAgCiAgICAgICAgICAgICAgICAKICAgICR4bWw9JzxyZWNvcmRzZXQ+JzsgICAgICAgICAgCiAgICAkeG1sLj0nPHJlY29yZD4nOyAgICAgICAgICAgCiAgICB3aGlsZShsaXN0KCRhLCRiKT1lYWNoKCRjb25maWcpKSAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPGZpZWxkIG5hbWU9IicuJGEuJyI+PCFbQ0RBVEFbJy4kYi4nXV0+PC9maWVsZD4nOyAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR4bWwuPSc8L3JlY29yZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR4bWwuPSc8L3JlY29yZHNldD4nOyAgICAgICAgICAgIAogICAgaGVhZGVyICgnQ29udGVudC1UeXBlOiB0ZXh0L3htbCcpOyAgICAgICAgIAogICAgZWNobyAkeG1sOyAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBkYXRlX3JhbmdlICgkaWQsJHF1ZXJ5PU5VTEwpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHJlc3VsdCA9IGZvcm1fZGF0YWJhc2VfcXVlcnkoJHF1ZXJ5PyRxdWVyeTonc2VsZWN0IEN1c3RvbURhdGUgZnJvbSByZWN1cnNlY3VzdG9tIHdoZXJlIGV2ZW50Zms9Jy4kaWQuJyBvcmRlciBieSBDdXN0b21EYXRlJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkeG1sPSc8cmVjb3Jkc2V0IGZvcj0iWycgLiAkaWQgLiAnXSI+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB3aGlsZSgkcm93ID1teXNxbF9mZXRjaF9yb3coJHJlc3VsdCkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPHJlY29yZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICR4bWwuPSc8ZmllbGQgbmFtZT0iRnJpZW5kbHlEYXRlIj4nLmRhdGUoJ2wsIEYgaiwgWScsIHN0cnRvdGltZSgkcm93WzBdKSkuJzwvZmllbGQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICR4bWwuPSc8ZmllbGQgbmFtZT0iQ3VzdG9tRGF0ZSI+Jy4kcm93WzBdLic8L2ZpZWxkPic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPC9yZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhtbC49JzwvcmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAkeG1sOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGV2ZW50X2NhdGVnb3J5ICgkaWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbD0nc2VsZWN0IGUuaWQsIGUudGl0bGUgZnJvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBqY3RfZXZlbnRfZm9sZGVycyBqIGlubmVyIGpvaW4gZXZlbnRmb2xkZXJzIGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBvbiBqLmZvbGRlcmZrID0gZS5pZCB3aGVyZSBqLmV2ZW50Zms9Jy4kaWQuJyBvcmRlciBieSBlLnRpdGxlJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHJlc3VsdCA9IGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkeG1sPSc8cmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB3aGlsZSgkcm93ID1teXNxbF9mZXRjaF9yb3coJHJlc3VsdCkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPHJlY29yZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICR4bWwuPSc8ZmllbGQgbmFtZT0iaWQiPicuJHJvd1swXS4nPC9maWVsZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHhtbC49JzxmaWVsZCBuYW1lPSJ0aXRsZSI+Jy4kcm93WzFdLic8L2ZpZWxkPic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPC9yZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhtbC49JzwvcmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAkeG1sOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZnVuY3Rpb24gZHVtcF9yZWN1cnNlKCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7CiAgICAkc3FsID0gJ3NlbGVjdCAqIGZyb20gcmVjdXJzb3JzJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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yeV9leCgiaW5zZXJ0IGludG8gIHJlY3Vyc2VjdXN0b20gKEV2ZW50RmssIEN1c3RvbURhdGUpIHZhbHVlcyAoJGlkLCAnIi4kZGF0ZXNbJGldLiInKSIpOyAgICAgICAgICAgICAgICAgICAgIAoJCQkJIGVjaG8gJy4uLi4nIC4gJGRhdGVzWyRpXSAuICc8YnI+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKZnVuY3Rpb24gZm9ybV9kYXRhYmFzZV9xdWVyeV9leCgkeCkKewoJZWNobyAkeCAuICc8YnI+JzsgZm9ybV9kYXRhYmFzZV9xdWVyeSAoJHgpOwp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmZ1bmN0aW9uIGV2ZW50X2RhdGVfc2NvcGUoJHN0YXJ0X2RhdGUsICRlbmRfZGF0ZSwgJHR5cGU9MCwgJHVuaXQ9MSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHJlc3VsdCA9IGRhdGVfc2NvcGUoJHN0YXJ0X2RhdGUsICRlbmRfZGF0ZSwgJHR5cGUsICR1bml0KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhtbD0nPHJlY29yZHNldD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9yKCRpPTA7JGk8c2l6ZW9mICgkcmVzdWx0KTskaSsrKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHhtbC49JzxyZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPGZpZWxkIG5hbWU9IkZyaWVuZGx5RGF0ZSI+Jy5kYXRlKCdsLCBGIGosIFknLCBzdHJ0b3RpbWUoJHJlc3VsdFskaV0pKS4nPC9maWVsZD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHhtbC49JzxmaWVsZCBuYW1lPSJDdXN0b21EYXRlIj4nLiRyZXN1bHRbJGldLic8L2ZpZWxkPic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkeG1sLj0nPC9yZWNvcmQ+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhtbC49JzwvcmVjb3Jkc2V0Pic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAkeG1sOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZnVuY3Rpb24gYmFja3VwX2RiICgkaWQsJGtleSwkc3RhcnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsID0gJ3NlbGVjdCAqIGZyb20gJyAuICRpZCAuICcgd2hlcmUgJyAuICRrZXkgLiAnID4gJyAuICRzdGFydCAuICcgb3JkZXIgYnkgJyAuICRrZXkgLiAnIGxpbWl0IDEwMCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICNlY2hvICRzcWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRvdXRwdXQgPSBzcWxfdGV4dCAoYXJyYXkoJHNxbCksJ2NzdicsdHJ1ZSwgJGtleSwkc3RhcnQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZnA9Zm9wZW4gKCd4bWwvJy4kaWQuJy50eHQnLCRzdGFydD4wPydhJzondycpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmd3JpdGUgKCRmcCwkb3V0cHV0KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZmNsb3NlICgkZnApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvICRfR0VUWydoaSddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBzcWxfdGV4dCAoJHF1ZXJpZXMsICR0eXBlPSdjc3YnLCAkcmV0dXJuPU5VTEwsICRrZXk9TlVMTCwgJHN0YXJ0PTAsICRjdXN0b209TlVMTCwgJGFsbHJvb209TlVMTCwgJHNxbG5hbWU9TlVMTCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkdGV4dD0iIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGhlYWRlcj1hcnJheSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRsaW5lPWFycmF5KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkX0dFVFsnZXh0cmFfa2V5cyddPWFycmF5KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkY291bnQ9MDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGhlYWQ9MDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJG5uX3JlY29yZHNldCA9ICR0eXBlPT0neG1zJ3x8JHR5cGU9PScxMjgnPydycyc6J3JlY29yZHNldCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRubl9yZWNvcmQgICAgPSAkdHlwZT09J3htcyd8fCR0eXBlPT0nMTI4Jz8ncic6J3JlY29yZCc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRubl9maWVsZCAgICAgPSAkdHlwZT09J3htcyd8fCR0eXBlPT0nMTI4Jz8nZic6J2ZpZWxkJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJG5uX25hbWUgICAgICA9ICR0eXBlPT0neG1zJ3x8JHR5cGU9PScxMjgnPyduJzonbmFtZSc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkbWltZXR5cGUgPSAnYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCiAgICAvLyBTdGFydCBzZW5kaW5nIGhlYWRlcnMgIGFwcGxpY2F0aW9uL3ZuZC5tcy1leGNlbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLyogKi8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKCEkcmV0dXJuKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBoZWFkZXIoIlByYWdtYTogcHVibGljIik7IC8vIHJlcXVpcmVkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaGVhZGVyKCJFeHBpcmVzOiAwIik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaGVhZGVyKCJDYWNoZS1Db250cm9sOiBtdXN0LXJldmFsaWRhdGUsIHBvc3QtY2hlY2s9MCwgcHJlLWNoZWNrPTAiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBoZWFkZXIoIkNhY2hlLUNvbnRyb2w6IHByaXZhdGUiLGZhbHNlKTsgLy8gcmVxdWlyZWQgZm9yIGNlcnRhaW4gYnJvd3NlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaGVhZGVyKCJDb250ZW50LXR5cGU6IHRleHQveG1sIik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGhlYWRlcigiQ29udGVudC1EaXNwb3NpdGlvbjogYXR0YWNobWVudDsgZmlsZW5hbWU9XCJlYiIgLiB0aW1lKCkgLiAiLiIgLiAoJHR5cGU9PSdjc3YnPydjc3YnOid4bWwnKSAuICJcIjsiICk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkb3V0cHV0ID0gJyc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmICgkdHlwZSE9J2NzdicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgJG91dHB1dC49ICc8Jy4kbm5fcmVjb3Jkc2V0Ligkc3FsbmFtZT8nIG5hbWU9IicuJHNxbG5hbWUuJyInOicnKS4nPic7ICAgICAgICAgICAgIAogICAgICAgJG91dHB1dC49ICc8bWFya2VyIG5hbWU9ImJlZ2luIiB2YWx1ZT0iJyAuIGRhdGUgKCdIOmk6cycpIC4gJyIvPic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9yZWFjaCAoJHF1ZXJpZXMgYXMgJHF1ZXJ5KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCR0eXBlIT0nY3N2JykgJG91dHB1dC49ICc8bWFya2VyIG5hbWU9InN0YXJ0LXF1ZXJ5IiB2YWx1ZT0iJyAuIGRhdGUgKCdIOmk6cycpIC4gJyIvPic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkcmVzdWx0ID0gZm9ybV9kYXRhYmFzZV9xdWVyeSgkcXVlcnkpOyAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCR0eXBlIT0nY3N2JykgJG91dHB1dC49ICc8bWFya2VyIG5hbWU9ImVuZC1xdWVyeSIgdmFsdWU9IicgLiBkYXRlICgnSDppOnMnKSAuICciLz4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCRoZWFkPT0wJiYkdHlwZT09J2NzdicmJnN0YXJ0PT0wKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBmb3IoJGk9MDsgICRpIDwgbXlzcWxfbnVtX2ZpZWxkcygkcmVzdWx0KTsgICRpKyspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICRuYW1lPW15c3FsX2ZpZWxkX25hbWUoJHJlc3VsdCwkaSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAkaGVhZGVyW109JG5hbWUgLiAoc3RycG9zKCRuYW1lLCdEYXRlJyk9PT1mYWxzZT8nOlN0cmluZyc6JzpEYXRlIFlNRCcpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRvdXRwdXQuPSBpbXBsb2RlICgnLCcsJGhlYWRlcikuIlxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkaGVhZCArKzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGlmICgkdHlwZSE9J2NzdicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJG91dHB1dC49ICc8c3FsPjwhW0NEQVRBWycuJHF1ZXJ5LiddXT48L3NxbD4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAKCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAovLwkJJHNvcnRlciA9IGFycmF5KCk7ICAgICAKLy8gICAgICAgIHdoaWxlKCRyb3cgPSBteXNxbF9mZXRjaF9yb3coJHJlc3VsdCkpICAkc29ydGVyW109JHJvdzsgICAKICAgICAgICAKCQl3aGlsZSgkcm93ID0gbXlzcWxfZmV0Y2hfcm93KCRyZXN1bHQpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRsaW5lPWFycmF5KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGlmICgkdHlwZSE9J2NzdicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAkb3V0cHV0Lj0gIlxuIiAuICc8Jy4kbm5fcmVjb3JkLic+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGZvcigkaT0wOyAgJGkgPCBteXNxbF9udW1fZmllbGRzKCRyZXN1bHQpOyAgJGkrKykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBpZiAobXlzcWxfZmllbGRfbmFtZSgkcmVzdWx0LCRpKT09JGtleSkgeyAkX0dFVFsnaGknXSA9ICRyb3dbJGldOyAkX0dFVFsnZXh0cmFfa2V5cyddW10gPSAkcm93WyRpXTsgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBpZiAoJHR5cGU9PSdjc3YnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAkdmFsID0gc3RyX3JlcGxhY2UgKCJcciIsIiAiLCRyb3dbJGldKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgJHZhbCA9IHN0cl9yZXBsYWNlICgiXG4iLCIgIiwkdmFsKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICRsaW5lW109JyInLiR2YWwuJyInOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB7ICAgICAgICAgCgkJCQkgICAgJHZhbHVlID0gJHR5cGU9PScxMjgnID8gdGV4dDEyOCgkcm93WyRpXSkgOiBodG1sX2VudGl0eV9kZWNvZGUoJHJvd1skaV0pOwogICAgICAgICAgICAgICAgICAgICRkbz0gaXNfbnVtZXJpYygkcm93WyRpXSk/JHJvd1skaV06JzwhW0NEQVRBWycuIHN0cl9yZXBsYWNlKCcmcG9zOycsICcmYXBvczsnLCAgJHZhbHVlICkgLiddXT4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgJG91dHB1dC49ICJcblx0IiAuICc8Jy4kbm5fZmllbGQuJyAnLiRubl9uYW1lLic9IicgLiBteXNxbF9maWVsZF9uYW1lKCRyZXN1bHQsJGkpIC4gJyI+Jy4kZG8uJzwvJy4kbm5fZmllbGQuJz4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGlmICgkdHlwZSE9J2NzdicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAkb3V0cHV0Lj0gIlxuIiAuICc8LycuJG5uX3JlY29yZC4nPic7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgfSAgZWxzZSAkb3V0cHV0Lj0gaW1wbG9kZSAoJywnLCRsaW5lKS4iXG4iOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkY291bnQgKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRhbGxrZXlzID0gaW1wbG9kZSAoJywnLCAkX0dFVFsnZXh0cmFfa2V5cyddKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmIChzdHJsZW4oJGFsbGtleXMpID4gMCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCRjdXN0b20pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJHNwZWNpYWw9YXJyYXkgKCdzZWxlY3QgY3AuZXZlbnRmaywgY3AucHJvcG5hbWUsIGNwLnByb3B2YWx1ZSwgZXAucHJvcGVydHlfZWFjaCwgZXAucHJvcGVydHlfdHlwZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIGN1c3RvbXByb3BlcnRpZXMgY3AgaW5uZXIgam9pbiBldmVudHMgZSBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3AuZXZlbnRmayA9IGUuaWQgaW5uZXIgam9pbiBlYnBfZXZlbnRfcHJvcGVydGllcyBlcCBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3AucHJvcG5hbWUgPSBlcC5wcm9wZXJ0eV9uYW1lICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZXJlIGNwLmV2ZW50ZmsgaW4gKCcuICRhbGxrZXlzIC4nKScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRvdXRwdXQuPSBzcWxfdGV4dCAoJHNwZWNpYWwsICR0eXBlLCB0cnVlLCBOVUxMLCAwLCBOVUxMLCBOVUxMLCAnY3VzdG9tJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCRhbGxyb29tKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgLy8gJHNwZWNpYWwgPSBhcnJheSgnc2VsZWN0IGVyLnJvb21maywgZXIuZXZlbnRmaywgci5Sb29tTmFtZSBmcm9tIGV2ZW50X3Jvb21zIGVyIGlubmVyIGpvaW4gcm9vbXMgciBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByLklEPWVyLnJvb21mayB3aGVyZSBldmVudGZrIGluICgnIC4gJGFsbGtleXMgLiAnKSBvcmRlciBieSBlci5ldmVudGZrJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi8vICAgICAgICAgICAgJG91dHB1dCAuPSBzcWxfdGV4dCAoJHNwZWNpYWwsICR0eXBlLCB0cnVlLCBOVUxMLCAwLCBOVUxMLCBOVUxMLCAncm9vbXMnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgCgkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJCSRzMT1nZXQoJ3MxJyk7ICAgICAgICAgICAgICAgICAgCgkJJHMyPWdldCgnczInKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBpZiAoZ2V0KCdhY3Rpb24nKT09J2V2ZW50J3x8Z2V0KCdhY3Rpb24nKT09J25leHQ1JykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgCgkJCSR3aGVyZSA9ICcgSUQ9SUQgJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJCSAgICBpZiAoc3RybGVuKCRzMSkgPiAwKQoJCQl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJCQkJaWYgKHN0cmxlbigkczIpID4gMCkKCQkJCXsKCQkJCQkkd2hlcmUgLj0gIiBhbmQgKGRhdGUpID49ICckczEnIGFuZCAoZGF0ZSkgPD0gJyRzMicgIjsKCQkJCX0KCQkJCWVsc2UKCQkJCXsgCgkJCSAgICAgICAgJHdoZXJlIC49ICIgYW5kIChkYXRlKSA9ICckczEnICI7IAoJCQkJfQoJCQl9ICAgICAgIAoJCQkgICAgICAgICAgICAgICAKICAgICAgICAgICAgJHNwZWNpYWwgPSBhcnJheSgnc2VsZWN0IGVyLnJvb21maywgZXIuZXZlbnRmaywgci5Sb29tTmFtZSBmcm9tIGV2ZW50X3Jvb21zIGVyIGlubmVyIGpvaW4gcm9vbXMgciBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgci5JRD1lci5yb29tZmsgd2hlcmUgZXZlbnRmayBpbiAoJyAuICRhbGxrZXlzIC4gJykgb3JkZXIgYnkgZXIuZXZlbnRmaycpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJG91dHB1dCAuPSBzcWxfdGV4dCAoJHNwZWNpYWwsICR0eXBlLCB0cnVlLCBOVUxMLCAwLCBOVUxMLCBOVUxMLCAncm9vbXMnKTsgICAgICAgIAoJCQogICAgICAgICAgICAkc3BlY2lhbCA9IGFycmF5ICgnc2VsZWN0IGouKiBmcm9tIGpjdF9ldmVudF9jYWxlbmRhciBqIHdoZXJlIGouZXZlbnRmayBpbiAoJyAuICRhbGxrZXlzIC4gJyknKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkb3V0cHV0IC49IHNxbF90ZXh0ICgkc3BlY2lhbCwgJHR5cGUsIHRydWUsIE5VTEwsIDAsIE5VTEwsIE5VTEwsICdjYWxlbmRhcnMnKTsgICAKCQkJICAgICAgICAgICAgICAgICAgCgkJCSRzcGVjaWFsID0gYXJyYXkgKCdzZWxlY3QgZXZlbnRmayBhcyBFdmVudElELCBDdXN0b21EYXRlIGFzIEV2ZW50RGF0ZSBmcm9tIHJlY3Vyc2VjdXN0b20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCQkJCQl3aGVyZSAnLnN0cl9yZXBsYWNlKCcoZGF0ZSknLCdDdXN0b21EYXRlJywkd2hlcmUpLicgYW5kIGV2ZW50ZmsgaW4gKCcgLiAkYWxsa2V5cyAuICcpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCQkJCQl1bmlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJCQkJCXNlbGVjdCBJRCBhcyBFdmVudElELCBFdmVudERhdGUgZnJvbSBldmVudHMgd2hlcmUgJy5zdHJfcmVwbGFjZSgnKGRhdGUpJywnRXZlbnREYXRlJywkd2hlcmUpLicgYW5kIElEIGluICgnIC4gJGFsbGtleXMgLiAnKSAnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJG91dHB1dCAuPSBzcWxfdGV4dCAoJHNwZWNpYWwsICR0eXBlLCB0cnVlLCBOVUxMLCAwLCBOVUxMLCBOVUxMLCAncmVjdXJzZWN1c3RvbScpOyAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJHR5cGUhPSdjc3YnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgIAogICAgICAgaWYgKCR0eXBlIT0nY3N2JykgJG91dHB1dC49ICc8bWFya2VyIG5hbWU9Im91dHB1dCIgdmFsdWU9IicgLiBkYXRlICgnSDppOnMnKSAuICciLz4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAkb3V0cHV0Lj0gJzwvJy4kbm5fcmVjb3Jkc2V0Lic+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJHJldHVybikgcmV0dXJuICRvdXRwdXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvICRvdXRwdXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBldmVudF9yYW5nZSAoJHMxPU5VTEwsJHMyPU5VTEwsJG5leHQ1PU5VTEwsJHJtPU5VTEwsJG5tPU5VTEwsJHVzPU5VTEwsJHQxPU5VTEwsJHQyPU5VTEwsJGRhPS0yLCRvcD0nY3N2JywkYXI9TlVMTCwkZXg9TlVMTCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsICAgID0gYXJyYXkoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGNsYXVzZSA9IGFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNpbmdsZSA9IGFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJG11bHRpcCA9IGFycmF5ICgpOyAgICAgICAgIAogICAgJHNpbmdsZVsnc2VsZWN0b3InXSA9ICdldi5SZWN1cnNlVHlwZSBpcyBudWxsIG9yIGV2LlJlY3Vyc2VUeXBlIDwgMCc7ICAgICAgICAgCiAgICAgICAgICAgICAKICAgICR3aGVyZT0kczE/ICgkczI/ImJldHdlZW4gJyRzMScgYW5kICckczInIjoiPSckczEnIikgOiAnPUV2ZW50RGF0ZSc7ICAgICAgICAgICAgIAogICAgaWYgKCRuZXh0NSkgICAgICAgICAgCiAgICB7ICAgICAgICAgCiAgICAgICAkd2hlcmU9Ij4gJyIgLiBkYXRlICgnWS1tLWQnKS4gIiciOyAgICAgICAgCgkgICAgICMgIG9yIChjdXN0LkN1c3RvbURhdGUgPSAnIiAuIGRhdGUgKCdZLW0tZCcsdGltZSgpKzg2NDAwKS4gIicpCiAgICAgICAkc2luZ2xlIFsnZGF0ZS5uZXh0N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9tRGF0ZSBiZXR3ZWVuICckczEnIGFuZCAnJHMyJyAiOyAgICAgICAgIAogICAgICAgIH0gICAgICAgICAKICAgICAgICBlbHNlICAgICAgICAgCiAgICAgICAgeyAgICAgICAgIAogICAgICAgICAgICAkc2luZ2xlIFsnZGF0ZS5zaW5nbGUnXSA9ICIgZXYuRXZlbnREYXRlID0gJyRzMScgIjsgICAgICAgICAKICAgICAgICAgICAgJG11bHRpcCBbJ2RhdGUuc2luZ2xlJ10gPSAiIGN1c3QuQ3VzdG9tRGF0ZSA9ICckczEnICI7ICAgICAgICAgCiAgICAgICAgfSAgICAgICAgIAogICAgfSAgICAgICAgIAogICAgICAgICAgICAgCiAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKCRybSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAKICAgICAgICAkcm9vbWVyID0nICgoZXIucm9vbWZrID0gJy4kcm1bMF0uJykgJyA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICR3aGVyZS49JyBhbmQgKChlci5yb29tZmsgPSAnLiRybVswXS4nKSAnOy8vIC4gcm9vbV9wYXJlbnRzKCRybSkgLiByb29tX2NoaWxkcmVuKCRybSkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZm9yICgkaT0wOyRpPHNpemVvZigkcm0pOyRpKyspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJHdoZXJlLj0gcm9vbV9wYXJlbnRzKCRybVskaV0pIC4gcm9vbV9jaGlsZHJlbigkcm1bJGldKSA7ICAgICAgICAgICAgICAKICAgICAgICAgICAgJHJvb21lci49IHJvb21fcGFyZW50cygkcm1bJGldKSAuIHJvb21fY2hpbGRyZW4oJHJtWyRpXSkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHdoZXJlLj0gJyknOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkcm9vbWVyLj0gJyknOyAgICAgICAgICAKICAgICAgICAkY2xhdXNlIFsncm9vbS5pZHMnXSA9ICRyb29tZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgCiAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJG5tKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkd2hlcmU9IiBFdmVudE5hbWUgTElLRSAnJSIgLiAkbm0gLiAiJScgIjsgICAgICAgICAgICAKICAgICAgICBpZiAoc3RybGVuIChnZXQgKCdhZicpKSA+IDApICAgICAgICAgCiAgICAgICAgeyAgICAgICAgIAogICAgICAgICAgICR3aGVyZSAuPSAiIE9SIGV2LiIgLiBnZXQoJ2FmJykgLiAiIExJS0UgJyUiIC4gJG5tLiAiJSciOyAgICAgICAgIAogICAgICAgIH0gICAgICAgIAogICAgICAgICRjbGF1c2UgWydldmVudC5uYW1lJ10gPSAkd2hlcmU7ICMgJyBFdmVudE5hbWUgTElLRSBcJyUnLiRubS4nJVwnJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJHVzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkd2hlcmUuPScgYW5kIENyZWF0ZUxvZ2luID0nLiR1czsgICAgICAgICAgICAgIAogICAgICAgICRjbGF1c2UgWydldmVudC51c2VyJ10gPSAnIENyZWF0ZUxvZ2luID0nLiR1czsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3doZXJlPScnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcndoZXJlPScnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoaXNfbnVtZXJpYygkZGEpJiYkZGE+PTApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzd2hlcmUuPSIgYW5kIERBVEVfRk9STUFUKCBldi5FdmVudERhdGUsICcldycgKSA9ICRkYSAiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHJ3aGVyZS49IiBhbmQgREFURV9GT1JNQVQoIGN1c3QuQ3VzdG9tRGF0ZSwgJyV3JyApID0gJGRhICI7ICAgICAgICAgICAgICAgIAogICAgICAgICRzaW5nbGUgWydkYXRlLm1hdGNoJ10gPSAiIERBVEVfRk9STUFUKCBldi5FdmVudERhdGUsICcldycgKSA9ICRkYSAiOyAgICAgICAgICAgIAogICAgICAgICRtdWx0aXAgWydkYXRlLm1hdGNoJ10gPSAiIERBVEVfRk9STUFUKCBjdXN0LkN1c3RvbURhdGUsICcldycgKSA9ICRkYSAiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKCRhcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAkb3I9YXJyYXkoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICRvYz1hcnJheSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICBmb3JlYWNoICgkYXIgYXMgJG8pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICRvcltdID0gJ1twb10gPSBcJycgLiAkbyAuICdcJyc7ICAgICAgICAgICAKICAgICAgICAgICAkb2NbXSA9ICJbcG9dID0gJG8gT1IgW3BjXSA9ICRvIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgfSAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICRzd2hlcmUgPSAnYW5kICgnIC5zdHJfcmVwbGFjZSAoJ1twb10nLCAnRXZlbnREYXRlJywgaW1wbG9kZSAoJyBvciAnLCAkb3IpKSAuICcpJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgJHJ3aGVyZSA9ICdhbmQgKCcgLnN0cl9yZXBsYWNlICgnW3BvXScsICdjdXN0LkN1c3RvbURhdGUnLCBpbXBsb2RlICgnIG9yICcsICRvcikpIC4gJyknOyAgICAgICAgICAgIAogICAgICAgICAgICAgICAgIAogICAgICAgJHNpbmdsZSBbJ2RhdGUubGlzdCddID0gc3RyX3JlcGxhY2UgKCdbcG9dJywgJ0V2ZW50RGF0ZScsIGltcGxvZGUgKCcgT1IgJywgJG9yKSkgOyAgICAgICAgICAgIAogICAgICAgJG11bHRpcCBbJ2RhdGUubGlzdCddID0gc3RyX3JlcGxhY2UgKCdbcG9dJywgJ2N1c3QuQ3VzdG9tRGF0ZScsIGltcGxvZGUgKCcgT1IgJywgJG9yKSkgOyAgICAgICAgICAgIAogICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkd2hlcmUuPSAgJHQxID8gJyBhbmQgKCBFdmVudFN0YXJ0VGltZSAnIC4gKCR0Mj8iYmV0d2VlbiAnJHQxJyBhbmQgJyR0MicgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yIEV2ZW50RW5kVGltZSBiZXR3ZWVuICckdDEnIGFuZCAnJHQyJyAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3IgJyR0MScgYmV0d2VlbiBFdmVudFN0YXJ0VGltZSAgYW5kIEV2ZW50RW5kVGltZSAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvciAnJHQyJyBiZXR3ZWVuIEV2ZW50U3RhcnRUaW1lIGFuZCBFdmVudEVuZFRpbWUgIjoiPSckdDEnIikgLiAnICknOiAnJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgCiAgICBpZiAoJHQxKSAgICAgICAgIAogICAgeyAgICAgICAgIAogICAgICAgICAgICAgICAgICAgIAogICAgICAgJGNsYXVzZSBbJ3RpbWUnXSA9ICcgRXZlbnRTdGFydFRpbWUgJyAuICgkdDI/ImJldHdlZW4gJyR0MScgYW5kICckdDInICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvciBFdmVudEVuZFRpbWUgYmV0d2VlbiAnJHQxJyBhbmQgJyR0MicgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yICckdDEnIGJldHdlZW4gRXZlbnRTdGFydFRpbWUgIGFuZCBFdmVudEVuZFRpbWUgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3IgJyR0MicgYmV0d2VlbiBFdmVudFN0YXJ0VGltZSBhbmQgRXZlbnRFbmRUaW1lICI6Ij0nJHQxJyIpIC4gJyAnIDsgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAKICAgICRpc2N1c3RvbSA9IHN0cmxlbiAoZ2V0ICgncG4nKSkgPiAwOyAgICAgICAgIAogICAgJGN1c3RvbT1hcnJheSAoJ2ZpZWxkcyc9PiAkaXNjdXN0b20gPyAnICwgY3AucHJvcHZhbHVlICcgOiAnJywgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAnam9pbic9PiAkaXNjdXN0b20gPyAnIGlubmVyIGpvaW4gY3VzdG9tcHJvcGVydGllcyBjcCBvbiBjcC5ldmVudGZrPWV2LmlkICcgOiAnJywgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAnd2hlcmUnPT4gJGlzY3VzdG9tID8gIiBjcC5wcm9wdmFsdWUgbGlrZSAnJSIgLiBnZXQgKCdwdicpIC4gIiUnIGFuZCBjcC5wcm9wbmFtZSA9ICciIC4gZ2V0ICgncG4nKSAuICInICIgOiAnJyAgICAgICAgIAogICAgICAgICAgICAgICAgKTsgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKHN0cmxlbiAoJGN1c3RvbVsnd2hlcmUnXSkgPiAwKSAgICAgICAgIAogICAgeyAgICAgICAgIAogICAgICAgICRjbGF1c2VbJ2N1c3RvbSddID0gJGN1c3RvbVsnd2hlcmUnXTsgICAgICAgICAKICAgIH0gICAgICAgICAgCiAgICAgICAgICAgICAKICAgICRtdWx0aXBfY2xhdXNlPWFycmF5KCk7ICAgICAgICAgCiAgICAkc2luZ2xlX2NsYXVzZT1hcnJheSgpOyAgICAgICAgIAogICAgd2hpbGUgKGxpc3QoJGEsJGIpPWVhY2ggKCRjbGF1c2UpKSAgICAgICAgIAogICAgeyAgICAgICAgIAogICAgICAgICRtdWx0aXBfY2xhdXNlW109IlxuLS0gJGEgY2xhdXNlIFxuICggJGIgKSI7ICAgICAgICAgCiAgICAgICAgJHNpbmdsZV9jbGF1c2VbXT0iXG4tLSAkYSBjbGF1c2UgXG4gKCAkYiApIjsgICAgICAgICAKICAgIH0gICAgICAgICAKICAgIHdoaWxlIChsaXN0KCRhLCRiKT1lYWNoICgkbXVsdGlwKSkgICAgICAgICAKICAgIHsgICAgICAgICAKICAgICAgICAkbXVsdGlwX2NsYXVzZVtdPSJcbi0tICRhIGNsYXVzZSBcbiAoICRiICkiOyAgICAgICAgIAogICAgfSAgICAgICAgIAogICAgd2hpbGUgKGxpc3QoJGEsJGIpPWVhY2ggKCRzaW5nbGUpKSAgICAgICAgIAogICAgeyAgICAgICAgIAogICAgICAgICRzaW5nbGVfY2xhdXNlW109IlxuLS0gJGEgY2xhdXNlIFxuICggJGIgKSI7ICAgICAgICAgCiAgICB9ICAgICAgICAgCiAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIyAgIFdIRVJFICAgKCAiIC4gKCRuZXh0NT8nY3VzdC5DdXN0b21EYXRlJzonRXZlbnREYXRlJykgLiAiICAkd2hlcmUgJHJ3aGVyZSAiIC4gJGN1c3RvbVsnd2hlcmUnXSAuICIpICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbFtdPSIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIENPVU5UKGV2LklEKSwgZXYuRXZlbnROYW1lLCBybS5Sb29tTmFtZSwgZXYuU2V0dXBTdGFydFRpbWUsIGV2LlNldHVwRW5kVGltZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZXYuRXZlbnRTdGFydFRpbWUsIGV2LkV2ZW50RW5kVGltZSwgIGV2LkV2ZW50RGF0ZSwgZXYuUmVjdXJzZUVuZERhdGUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICgoVElNRV9UT19TRUMoZXYuU2V0dXBFbmRUaW1lKSAtIFRJTUVfVE9fU0VDKGV2LlNldHVwU3RhcnRUaW1lKSkgLyAzNjAwKSBhcyBEdXJhdGlvbiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAoIENBU0UgV0hFTiBldS5GaXJzdE5hbWUgaXMgbnVsbCBUSEVOICcobm90IGFwcHJvdmVkKScgRUxTRSBDT05DQVQoZXUuRmlyc3ROYW1lLCcgJyxldS5MYXN0TmFtZSkgRU5EICkgYXMgRnVsbE5hbWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGV2LkRlc2NyaXB0aW9uLCAgZXYuQ29tbWVudHMsICBldi5DcmVhdGVEYXRlLCAgZXYuQ3JlYXRlTG9naW4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5BcHByb3ZlRGF0ZSwgIGV2LkFwcHJvdmVMb2dpbiwgIGV2LkRpc3BsYXksICBldi5SZWN1cnJpbmcsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5BdHRlbmRlZXMsICBldi5SZWN1cnNlVHlwZSwgZXYuUmVjdXJzZVVuaXQsICAgICAgICAgICAgCiAgICAgICAgICAgICAoIENBU0UgV0hFTiBjdXN0LkN1c3RvbURhdGUgaXMgbnVsbCBUSEVOIGV2LkV2ZW50RGF0ZSBFTFNFIGN1c3QuQ3VzdG9tRGF0ZSBFTkQgKSBhcyBDdXN0b21EYXRlLCAgICAKICAgICAgICAgICAgZXYuUmVjdXJzZVR5cGUgYXMgdHlwZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBldi5JRCwgZXYuUm9vbUlELCBldi5GZWF0dXJlZCAiIC4gJGN1c3RvbVsnZmllbGRzJ10gLiAiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgRlJPTSAgICBldmVudHMgZXYgICAgICAgICAgICAgIAogICAgICAgICAgICAgaW5uZXIgam9pbiByb29tcyBybSBvbiBybS5pZCA9IGV2LlJvb21JRCAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIiAuICgkcm0gPyAiIGlubmVyIGpvaW4gZXZlbnRfcm9vbXMgZXIgb24gZXYuSUQgPSBlci5ldmVudGZrICIgOiAiIikgLiAiICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgaW5uZXIgam9pbiBldmVudF91c2VycyBldSBvbiBldS5pZCA9IGV2LkNyZWF0ZUxvZ2luICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgaW5uZXIgam9pbiByZWN1cnNlY3VzdG9tIGN1c3Qgb24gZXYuaWQgPSBjdXN0LmV2ZW50ZmsgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICIgLiAkY3VzdG9tWydqb2luJ10gLiAiICAgICAgICAgICAgICAgIAogICAgIiAuIChzaXplb2YgKCRtdWx0aXBfY2xhdXNlKSA+IDAgPyAnV0hFUkUgJyAuIGltcGxvZGUgKCcgQU5EICcsICRtdWx0aXBfY2xhdXNlKSA6ICcnKSAuICAKICAgICIgR1JPVVAgQlkgZXYuSUQgICIgLyouIAoJKCRuZXh0NSA/ICcgT1JERVIgQlkgY3VzdC5DdXN0b21EYXRlLCBldi5FdmVudFN0YXJ0VGltZSc6JycpIC4gICAgICAgICAgIAoJKCRuZXh0NSA/ICcgbGltaXQgNSc6JycpKi8gOyAgICAgICAgICAKICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxbXT0iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIFNFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBDT1VOVChldi5JRCksIGV2LkV2ZW50TmFtZSwgcm0uUm9vbU5hbWUsIGV2LlNldHVwU3RhcnRUaW1lLCBldi5TZXR1cEVuZFRpbWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGV2LkV2ZW50U3RhcnRUaW1lLCBldi5FdmVudEVuZFRpbWUsIGV2LkV2ZW50RGF0ZSwgZXYuUmVjdXJzZUVuZERhdGUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICgoVElNRV9UT19TRUMoZXYuU2V0dXBFbmRUaW1lKSAtIFRJTUVfVE9fU0VDKGV2LlNldHVwU3RhcnRUaW1lKSkgLyAzNjAwKSBhcyBEdXJhdGlvbiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAoIENBU0UgV0hFTiBldS5GaXJzdE5hbWUgaXMgbnVsbCBUSEVOICcobm90IGFwcHJvdmVkKScgRUxTRSBDT05DQVQoZXUuRmlyc3ROYW1lLCcgJyxldS5MYXN0TmFtZSkgRU5EICkgYXMgRnVsbE5hbWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGV2LkRlc2NyaXB0aW9uLCAgZXYuQ29tbWVudHMsICBldi5DcmVhdGVEYXRlLCAgZXYuQ3JlYXRlTG9naW4sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5BcHByb3ZlRGF0ZSwgIGV2LkFwcHJvdmVMb2dpbiwgIGV2LkRpc3BsYXksICBldi5SZWN1cnJpbmcsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5BdHRlbmRlZXMsICBldi5SZWN1cnNlVHlwZSwgZXYuUmVjdXJzZVVuaXQsICAgIAogICAgICAgICAgICAgZXYuRXZlbnREYXRlIGFzIEN1c3RvbURhdGUsICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBldi5SZWN1cnNlVHlwZSBhcyB0eXBlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGV2LklELCBldi5Sb29tSUQsIGV2LkZlYXR1cmVkICIgLiAkY3VzdG9tWydmaWVsZHMnXSAuICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBGUk9NICAgIGV2ZW50cyBldiAgICAgICAgICAgICAgCiAgICAgICAgICAgICBpbm5lciBqb2luIHJvb21zIHJtIG9uIHJtLmlkID0gZXYuUm9vbUlEICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAiIC4gKCRybSA/ICIgaW5uZXIgam9pbiBldmVudF9yb29tcyBlciBvbiBldi5JRCA9IGVyLmV2ZW50ZmsgIiA6ICIiKSAuICIgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBsZWZ0IGpvaW4gZXZlbnRfdXNlcnMgZXUgb24gZXUuaWQgPSBldi5DcmVhdGVMb2dpbiAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICIgLiAkY3VzdG9tWydqb2luJ10gLiAiICAgICAgICAgICAgICAgIAogICAgIiAuIChzaXplb2YgKCRzaW5nbGVfY2xhdXNlKSA+IDAgPyAnV0hFUkUgJyAuIGltcGxvZGUgKCcgQU5EICcsICRzaW5nbGVfY2xhdXNlKSA6ICcnKSAuICIgIiAuCiAgICAiIEdST1VQIEJZIGV2LklEICAiIC4gCgkoJG5leHQ1ID8gJyBPUkRFUiBCWSBDdXN0b21EYXRlLCBFdmVudFN0YXJ0VGltZSwgRXZlbnRFbmRUaW1lLCBFdmVudE5hbWUnOicnKSAuICAgICAgICAgICAKCSgkbmV4dDUgPyAnIGxpbWl0IDEwJzonJykvKiovIDsgICAgICAgICAgCiAgICAgICAgICAgICAKICAgICNwcmludF9yICgkc3FsKTsgZXhpdDsgICAgICAgICAKICAgICAgICAgICAgIAoJaWYgKCRuZXh0NSkgJHNxbCA9IGFycmF5IChpbXBsb2RlICgnIFVOSU9OICcsICRzcWwpKTsJCQkgCgkJCSAKCQkJIAogICAgZWNobyBzcWxfdGV4dCAoJHNxbCwgJG9wLCBOVUxMLCAnSUQnLCAwLCBnZXQgKCdjdicpLCBnZXQgKCdjcicpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIHNxbF9mZWF0dXJlZCAoKSAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgIAogICAkc3FsPWFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsW109IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBTRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgQ09VTlQoZXIucm9vbWZrKSBhcyBFdmVudENvdW50LCBldi5FdmVudE5hbWUsIHJtLlJvb21OYW1lLCBldi5TZXR1cFN0YXJ0VGltZSwgZXYuU2V0dXBFbmRUaW1lLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBldi5FdmVudFN0YXJ0VGltZSwgZXYuRXZlbnRFbmRUaW1lLCBldi5FdmVudERhdGUsIGV2LlJlY3Vyc2VFbmREYXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAoKFRJTUVfVE9fU0VDKGV2LlNldHVwRW5kVGltZSkgLSBUSU1FX1RPX1NFQyhldi5TZXR1cFN0YXJ0VGltZSkpIC8gMzYwMCkgYXMgRHVyYXRpb24sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgKCBDQVNFIFdIRU4gZXUuRmlyc3ROYW1lIGlzIG51bGwgVEhFTiAnKG5vdCBhcHByb3ZlZCknIEVMU0UgQ09OQ0FUKGV1LkZpcnN0TmFtZSwnICcsZXUuTGFzdE5hbWUpIEVORCApIGFzIEZ1bGxOYW1lLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5EZXNjcmlwdGlvbiwgIGV2LkNvbW1lbnRzLCAgZXYuQ3JlYXRlRGF0ZSwgIGV2LkNyZWF0ZUxvZ2luLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgZXYuQXBwcm92ZURhdGUsICBldi5BcHByb3ZlTG9naW4sICBldi5EaXNwbGF5LCAgZXYuUmVjdXJyaW5nLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgZXYuQXR0ZW5kZWVzLCAgZXYuUmVjdXJzZVR5cGUsIFJlY3Vyc2VVbml0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgKCBDQVNFIFdIRU4gY3VzdC5DdXN0b21EYXRlIGlzIG51bGwgVEhFTiBldi5FdmVudERhdGUgRUxTRSBjdXN0LkN1c3RvbURhdGUgRU5EICkgYXMgQ3VzdG9tRGF0ZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZXYuUmVjdXJzZVR5cGUgYXMgdHlwZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBlci5yb29tZmsgYXMgUm9vbUlkZW50LCBldi5JRCwgZXYuUm9vbUlELCBldi5GZWF0dXJlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgRlJPTSAgICBldmVudHMgZXYgaW5uZXIgam9pbiBldmVudF9yb29tcyBlciBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBlci5ldmVudGZrID0gZXYuaWQgaW5uZXIgam9pbiByb29tcyBybSBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBybS5pZCA9IGVyLnJvb21mayBsZWZ0IG91dGVyIGpvaW4gcmVjdXJzZWN1c3RvbSBjdXN0IG9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZXYuaWQgPSBjdXN0LmV2ZW50ZmsgbGVmdCBvdXRlciBqb2luIGV2ZW50X3VzZXJzIGV1IG9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGV1LmlkID0gZXYuQXBwcm92ZUxvZ2luICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIFdIRVJFICAgIEZlYXR1cmVkPTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBHUk9VUCBCWSBldi5JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICIgOyAgICAgCgkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBzcWxfdGV4dCAoJHNxbCwgJ3htcycsIE5VTEwsICdJRCcsIDApOyAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIHNxbF9jYWxlbmRhciAoJGlkLCRzdGFydCwkZW5kPU5VTEwpICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsPWFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgCiAgICAkd2hlcmUgPSAkZW5kID8gIlBBUkFNID49ICciIC4gJHN0YXJ0IC4gIicgYW5kIFBBUkFNIDw9ICciIC4gJGVuZCAuICInIiA6ICJQQVJBTSA9ICciIC4gJHN0YXJ0IC4gIiciOyAgICAgICAgICAgICAgICAKICAgICRzcWxbXT0iICAgICAgICAgICAgICAgICAgIAogICAgU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZXYuRXZlbnROYW1lLCBybS5Sb29tTmFtZSwgZXYuU2V0dXBTdGFydFRpbWUsIGV2LlNldHVwRW5kVGltZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBldi5FdmVudFN0YXJ0VGltZSwgZXYuRXZlbnRFbmRUaW1lLCBldi5FdmVudERhdGUsIGV2LlJlY3Vyc2VFbmREYXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICgoVElNRV9UT19TRUMoZXYuU2V0dXBFbmRUaW1lKSAtIFRJTUVfVE9fU0VDKGV2LlNldHVwU3RhcnRUaW1lKSkgLyAzNjAwKSBhcyBEdXJhdGlvbiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5EZXNjcmlwdGlvbiwgIGV2LkNvbW1lbnRzLCAgZXYuQ3JlYXRlRGF0ZSwgIGV2LkNyZWF0ZUxvZ2luLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBldi5BcHByb3ZlRGF0ZSwgIGV2LkFwcHJvdmVMb2dpbiwgIGV2LkRpc3BsYXksICBldi5SZWN1cnJpbmcsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGV2LkF0dGVuZGVlcywgIGV2LlJlY3Vyc2VUeXBlLCBldi5SZWN1cnNlVW5pdCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgY3VzdC5DdXN0b21EYXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGV2LlJlY3Vyc2VUeXBlIGFzIHR5cGUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBldi5JRCwgZXYuUm9vbUlELCBldi5GZWF0dXJlZCwgZWMuQ2FsZW5kYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBGUk9NICAgIGV2ZW50cyBldiBqb2luIHJvb21zIHJtIG9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZXYuUm9vbUlEPSBybS5pZCBpbm5lciBqb2luIGpjdF9ldmVudF9jYWxlbmRhciBlYyBvbiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZXYuaWQgPSBlYy5FdmVudEZrIGxlZnQgb3V0ZXIgam9pbiByZWN1cnNlY3VzdG9tIGN1c3Qgb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGVjLkV2ZW50RmsgPSBjdXN0LmV2ZW50ZmsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBXSEVSRSBlYy5DYWxlbmRhciA9ICIgLiAkaWQgLiAiIEFORCAkd2hlcmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIEdST1VQIEJZIGV2LklEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIiA7IAoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRxdWVyaWVzPWFycmF5KCIgICAgICAgICAgICAgICAgICAgCiAgICBTRUxFQ1QgIGV2LkV2ZW50TmFtZSwgZXYuRXZlbnRTdGFydFRpbWUsIGV2LkV2ZW50RW5kVGltZSxldi5EZXNjcmlwdGlvbiwKCQkJZXYuRGlzcGxheSwgZXYuQXR0ZW5kZWVzLCBldi5JRCwgZXYuUm9vbUlELCBldi5GZWF0dXJlZCwgCgkJCWVjLkNhbGVuZGFyLCBldi5FdmVudERhdGUsIHJtLlJvb21OYW1lLAoJCQknLTEnIGFzIFJlY3Vyc2VUeXBlLCcwJyBhcyBSZWN1cnNlVW5pdCwnJyBhcyBSZWN1cnNlRW5kRGF0ZSAgICAgICAg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IC4gIiBBTkQgIiAuIHN0cl9yZXBsYWNlKCdQQVJBTScsJ3JjLkN1c3RvbURhdGUnLCR3aGVyZSkgLiAiIAogICAgT1JERVIgQlkgRXZlbnRTdGFydFRpbWUsIEV2ZW50RW5kVGltZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAiICk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCSRubl9yZWNvcmQgPSAncic7ICAgICAKCSRubl9maWVsZCAgPSAnZic7ICAgICAKCSRubl9uYW1lICAgPSAnbic7ICAgICAgICAgICAgICAgICAgICAgIAoJJG91dHB1dCAgICA9IGFycmF5KCk7Cgkkb3V0cHV0W10gID0gJzxycz4nOyAgICAgIAoJZm9yZWFjaCAoJHF1ZXJpZXMgYXMgJHF1ZXJ5KQoJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJCSRyZXN1bHQgPSBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRxdWVyeSk7IAoJIwkkb3V0cHV0W10gPSAnPHNxbCByb3dzPSInIC4gbXlzcWxfbnVtX3Jvd3MoJHJlc3VsdCkgLiAnIj48IVtDREFUQVsnLiRxdWVyeS4nXV0+PC9zcWw+JzsgICAgCgkJd2hpbGUoJHJvdyA9IG15c3FsX2ZldGNoX3JvdygkcmVzdWx0KSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJCSRkYXRlPU5VTEw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJCSRyZWNvcmQ9IGFycmF5KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCQkJJHJlY29yZFtdPSAnPCcuJG5uX3JlY29yZC4nPic7ICAKCQkJZm9yKCRpPTA7ICAkaSA8IG15c3FsX251bV9maWVsZHMoJHJlc3VsdCk7ICAkaSsrKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCQkJeyAgICAgICAgIAoJCQkJJGRvPSBpc19udW1lcmljKCRyb3dbJGldKT8kcm93WyRpXTonPCFbQ0RBVEFbJy4oJHJvd1skaV0pLiddXT4nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJCQkkcmVjb3JkW10gPSAnPCcuJG5uX2ZpZWxkLicgJy4kbm5fbmFtZS4nPSInIC4gbXlzcWxfZmllbGRfbmFtZSgkcmVzdWx0LCRpKSAuICciPicuJGRvLic8LycuJG5uX2ZpZWxkLic+JzsgICAgIAoJCQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJCQkkcmVjb3JkW109ICc8LycuJG5uX3JlY29yZC4nPic7IAoJCQkkb3V0cHV0W10gPSBpbXBsb2RlKCcnLCRyZWNvcmQpOyAKCQkJIAoJCX0gICAgICAKCX0gICAgICAgICAgICAgCgkkb3V0cHV0W10gPSAnPC9ycz4nOyAgIAoJCiAgICAjaGVhZGVyICgnQ29udGVudC1UeXBlOiB0ZXh0L3htbCcpOwogICAgcmV0dXJuIGltcGxvZGUoJycsJG91dHB1dCk7Ly9zcWxfdGV4dCAoJHNxbCwgJ3htcycsIE5VTEwsICdJRCcsIDApOyAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAKCgpmdW5jdGlvbiB2Yl9nZXRfd2VlaygkZGF0ZSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHRvZGF5ID0gZGF0ZSgiZCIsICRkYXRlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiBmbG9vcigkdG9kYXkgLyA3KSAtICgkdG9kYXkgJSA3ID09IDAgPyAxIDogMCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBkYXRlX3Njb3BlKCRzdGFydF9kYXRlLCAkZW5kX2RhdGUsICR0eXBlPTAsICR1bml0PTEpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzdGFydF9tYXJrZXIgICAgID0gJHN0YXJ0X2RhdGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZW5kX21hcmtlciAgICAgICA9ICRlbmRfZGF0ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRkYXRlX2lzX3ZhbGlkICAgID0gdHJ1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRkYXRlX3Njb3BlX2FyciAgID0gYXJyYXkoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRsb29wX3VwcGVyX2xpbWl0ID0gMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgLy8gZm9yIFdFRUtEQVkgdHlwZXMsIGZpcnN0IGRhdGUgaW4gbGlzdCBtdXN0IGJlIGEgd2VlayBkYXkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmICgkdHlwZT09UkVDVVJTRV9UWVBFX1dFRUtEQVkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGRhdGVfaXNfdmFsaWQgID0gISAoIGRhdGUoInciLCAkc3RhcnRfbWFya2VyKT09MCB8fCBkYXRlKCJ3IiwgJHN0YXJ0X21hcmtlcik9PTYgKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgLy8gZm9yIENVU1RPTSB0eXBlcywgcmV0dXJuIG5vIGRhdGEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmICgkdHlwZT09UkVDVVJTRV9UWVBFX0NVU1RPTSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICByZXR1cm4gJGRhdGVfc2NvcGVfYXJyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHdoaWxlICgkc3RhcnRfbWFya2VyPD0kZW5kX21hcmtlcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAkbG9vcF91cHBlcl9saW1pdCArKzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGlmICgkbG9vcF91cHBlcl9saW1pdD4xMDAwKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIGlmICgkZGF0ZV9pc192YWxpZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAkZGF0ZV9zY29wZV9hcnJbXSA9IGRhdGUoJ1ktbS1kJywkc3RhcnRfbWFya2VyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAkZGF0ZV9pc192YWxpZCA9IHRydWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAkbW0gPSBkYXRlICgibSIsICRzdGFydF9tYXJrZXIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgJGRkID0gZGF0ZSAoImQiLCAkc3RhcnRfbWFya2VyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICR5eSA9IGRhdGUgKCJZIiwgJHN0YXJ0X21hcmtlcik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgaWYgKCR0eXBlPT1SRUNVUlNFX1RZUEVfREFJTFkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgJHN0YXJ0X21hcmtlciA9IG1rdGltZSgwLCAwLCAwLCAkbW0sICRkZCskdW5pdCwgJHl5KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgZWxzZSBpZiAoJHR5cGU9PVJFQ1VSU0VfVFlQRV9XRUVLTFkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgJHN0YXJ0X21hcmtlciA9IG1rdGltZSgwLCAwLCAwLCAkbW0sICRkZCsoJHVuaXQqNyksICR5eSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBlbHNlIGlmICgkdHlwZT09UkVDVVJTRV9UWVBFX01PTlRITFlfREFURSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAkc3RhcnRfbWFya2VyID0gbWt0aW1lKDAsIDAsIDAsICRtbSskdW5pdCwgJGRkLCAkeXkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgIGlmIChkYXRlICgiZCIsICRzdGFydF9kYXRlKSE9ZGF0ZSAoImQiLCAkc3RhcnRfbWFya2VyKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICRkYXRlX2lzX3ZhbGlkID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgZWxzZSBpZiAoJHR5cGU9PVJFQ1VSU0VfVFlQRV9NT05USExZX0RBWSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICRuZXh0X21vbnRoX2luZGV4ICA9IDE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICB3aGlsZSAoJG5leHRfbW9udGhfaW5kZXg8MzIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAkZmlyc3Rfb2ZfbmV4dCAgID0gbWt0aW1lKDAsIDAsIDAsIGRhdGUgKCJtIiwgJHN0YXJ0X21hcmtlcikrJHVuaXQsICRuZXh0X21vbnRoX2luZGV4LCBkYXRlICgiWSIsICRzdGFydF9tYXJrZXIpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgaWYgKCB2Yl9nZXRfd2VlaygkZmlyc3Rfb2ZfbmV4dCk9PXZiX2dldF93ZWVrKCRzdGFydF9kYXRlKSAmJiBkYXRlKCJ3IiwgJGZpcnN0X29mX25leHQpPT1kYXRlKCJ3IiwgJHN0YXJ0X2RhdGUpICkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgJHN0YXJ0X21hcmtlciA9ICRmaXJzdF9vZl9uZXh0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgJG5leHRfbW9udGhfaW5kZXggKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBlbHNlIGlmICgkdHlwZT09UkVDVVJTRV9UWVBFX1lFQVJMWSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAkc3RhcnRfbWFya2VyID0gbWt0aW1lKDAsIDAsIDAsICRtbSwgJGRkLCAkeXkrJHVuaXQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgZWxzZSBpZiAoJHR5cGU9PVJFQ1VSU0VfVFlQRV9XRUVLREFZKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICRzbG90ICA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgJHRtcF9tYXJrZXIgPSAkc3RhcnRfbWFya2VyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgIHdoaWxlICgkc2xvdDw0KSB7IC8vIGFzc3VtZXMgb25lIG9mIHRoZSBuZXh0IDMgZGF5cyBtdXN0IGJlIGEgd2Vla2RheSEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgJHRtcF9tYXJrZXIgPSBta3RpbWUoMCwgMCwgMCwgZGF0ZSAoIm0iLCAkdG1wX21hcmtlciksIGRhdGUgKCJkIiwgJHRtcF9tYXJrZXIpKyR1bml0LCBkYXRlICgiWSIsICR0bXBfbWFya2VyKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgIGlmICghICggZGF0ZSgidyIsICR0bXBfbWFya2VyKT09MCB8fCBkYXRlKCJ3IiwgJHRtcF9tYXJrZXIpPT02ICkgICkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAkc3RhcnRfbWFya2VyID0gJHRtcF9tYXJrZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAkc2xvdCArKzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAjICBzb3J0ICggJGRhdGVfc2NvcGVfYXJyICk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgcmV0dXJuICRkYXRlX3Njb3BlX2FycjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKCmZ1bmN0aW9uIHNlbGVjdF9zaW5nbGVfbm9kZSgkbm9kZSwgJHZhbHVlKSAvLyBzZWxlY3Rfc2luZ2xlX25vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR4cGF0aCA9IHhwYXRoX25ld19jb250ZXh0KCRub2RlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhub2RlID0geHBhdGhfZXZhbCgkeHBhdGgsICR2YWx1ZSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JlYWNoICgkeG5vZGUtPm5vZGVzZXQgYXMgJG5vZGUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICByZXR1cm4gJG5vZGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiBmYWxzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gLy8gc2VsZWN0X3NpbmdsZV9ub2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIHNlbGVjdF9ub2Rlcygkbm9kZSwgJHZhbHVlKSAvLyBzZWxlY3Rfbm9kZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR4cGF0aCA9IHhwYXRoX25ld19jb250ZXh0KCRub2RlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHhub2RlID0geHBhdGhfZXZhbCgkeHBhdGgsICR2YWx1ZSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuICR4bm9kZS0+bm9kZXNldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gLy8gc2VsZWN0X25vZGVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLy8gY2hlY2sgZm9yIGNvbmZsaWN0cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmZ1bmN0aW9uIHNxbF9kZWxldGVfZnJvbSgkdGFibGVuYW1lLCAka2V5bmFtZSwgJGtleXZhbHVlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuICJERUxFVEUgRlJPTSAkdGFibGVuYW1lIFdIRVJFICRrZXluYW1lID0gJyRrZXl2YWx1ZSciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIHJvb21fcGFyZW50cygka2V5KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcmVzdWx0ID0gIiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkdGVtcCAgID0gZm9ybV9kYXRhYmFzZV9xdWVyeSgiU0VMRUNUIFJvb21GayBGUk9NIHJvb21zIFdIRVJFIElEPSRrZXkiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgd2hpbGUoJHJvdyA9IG15c3FsX2ZldGNoX2FycmF5KCR0ZW1wLCBNWVNRTF9BU1NPQykpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGlmICgkcm93WyJSb29tRmsiXT4wKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJHJlc3VsdCAuPSAiIE9SIChlci5yb29tZms9Ii4kcm93WyJSb29tRmsiXS4iKSAiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHJlc3VsdCAuPSByb29tX3BhcmVudHMoJHJvd1siUm9vbUZrIl0pIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuICRyZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiByb29tX2NoaWxkcmVuKCRrZXkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRyZXN1bHQgPSAiIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHRlbXAgICA9IGZvcm1fZGF0YWJhc2VfcXVlcnkoIlNFTEVDVCBJRCxSb29tRmsgRlJPTSByb29tcyBXSEVSRSBSb29tRms9JGtleSIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB3aGlsZSgkcm93ID0gbXlzcWxfZmV0Y2hfYXJyYXkoJHRlbXAsIE1ZU1FMX0FTU09DKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRyZXN1bHQgLj0gIiBPUiAoZXIucm9vbWZrPSIuJHJvd1siSUQiXS4iKSAiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHJlc3VsdCAuPSByb29tX2NoaWxkcmVuKCRyb3dbIklEIl0pIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICByZXR1cm4gJHJlc3VsdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGRlbGV0ZV91c2VyICgkZWJwX2VfaWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9IHNxbF9kZWxldGVfZnJvbSAoImV2ZW50X3VzZXJzIiwgIklEIiwgJGVicF9lX2lkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGRlbGV0ZV9ldmVudCAoJGVicF9lX2lkLCRlYnBfY2tfYWRtaXQ9NSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJGVicF9lX2lkPT0wKSByZXR1cm4gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfZXZlbnRfY29tbWFuZHMgICA9IGFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSBzcWxfZGVsZXRlX2Zyb20gKCJldmVudHMiLCAiSUQiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gc3FsX2RlbGV0ZV9mcm9tICgiamN0X2V2ZW50X2ZvbGRlcnMiLCAiZXZlbnRmayIsICRlYnBfZV9pZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSBzcWxfZGVsZXRlX2Zyb20gKCJqY3RfZXZlbnRfdXNlcnMiLCAiZXZlbnRmayIsICRlYnBfZV9pZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSBzcWxfZGVsZXRlX2Zyb20gKCJldmVudF9yb29tcyIsICJldmVudGZrIiwgJGVicF9lX2lkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9IHNxbF9kZWxldGVfZnJvbSAoInJlY3Vyc29ycyIsICJldmVudEZrIiwgJGVicF9lX2lkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9IHNxbF9kZWxldGVfZnJvbSAoInJlY3Vyc2VjdXN0b20iLCAiZXZlbnRGayIsICRlYnBfZV9pZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSBzcWxfZGVsZXRlX2Zyb20gKCJjdXN0b21wcm9wZXJ0aWVzIiwgImV2ZW50RmsiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gc3FsX2RlbGV0ZV9mcm9tICgiamN0X2V2ZW50X2NhbGVuZGFyIiwgImV2ZW50RmsiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfbG9nX2luc2VydCA9ICJJTlNFUlQgSU5UTyBsb2cgKEV2ZW50RmssIFVzZXJGaywgRGF0ZU1vZGlmaWVkKSBWQUxVRVMgKCIgLiAkZWJwX2VfaWQgLiAiLCAiIC4gJGVicF9ja19hZG1pdCAuICIsICciIC4gZGF0ZSgiWS1tLWQiKSAuICInKSI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9ICRzcWxfbG9nX2luc2VydDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCgogICAgZm9yICgkZT0wOyRlPGNvdW50KCRzcWxfZXZlbnRfY29tbWFuZHMpOyRlKyspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgcHJpbnQgJHNxbF9ldmVudF9jb21tYW5kc1skZV0uIlxuIjsgLy8tLS0tLS0tLS0tLS0tLS0tLS1cbiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWxfZXZlbnRfY29tbWFuZHNbJGVdKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBzYXZlX2dlbmVyaWMgKCRkb20sICR0YWJsZT0nZXZlbnRfdXNlcnMnLCAkbm9kZT0ndXNlcicsICRrZXk9J0lEJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHM9YXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRpX2ZpZWxkcz1hcnJheSAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGlfdmFsdWVzPWFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkdV92YWx1ZXM9YXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAndXBkYXRlICcuJHRhYmxlLicgc2V0ICc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vJy4kbm9kZS4nL3IvZicpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJG49JGZpZWxkLT5nZXRfYXR0cmlidXRlICgnbicpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCRuPT0ka2V5KSAkaWQ9JGZpZWxkLT5nZXRfY29udGVudCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRmaWVsZHNbJG5dID0gJGZpZWxkLT5nZXRfY29udGVudCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICR2YWx1ZXNbXSAuPSAiXG4kbj0nIi4kZmllbGRzWyRuXS4iJyI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJGlfZmllbGRzW10gLj0gIiIuJG4uIiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJGlfdmFsdWVzW10gLj0gIiciLnN0cl9yZXBsYWNlKCInIiwiJmFwb3M7IiwkZmllbGRzWyRuXSkuIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJGlkPjApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsID0gJ3VwZGF0ZSAnLiR0YWJsZS4nIHNldCAnIC4gaW1wbG9kZSAoJywnLCAkdmFsdWVzKSAuICcgd2hlcmUgJyAuICRrZXkgLiAnID0gJyAuICRpZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVjaG8gJHNxbCAuICJcbiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWwgPSAnaW5zZXJ0IGludG8gJy4kdGFibGUuJyAoJyAuIGltcGxvZGUgKCcsJywgJGlfZmllbGRzKSAuICcpIHZhbHVlcyAoJyAuIGltcGxvZGUgKCcsJywgJGlfdmFsdWVzKSAuICcpJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVjaG8gJHNxbCAuICJcbiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9pZF9yZXN1bHQgPSBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCJTRUxFQ1QgJGtleSBGUk9NICR0YWJsZSBPUkRFUiBCWSAka2V5IERFU0MiKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBpZiAoJHJvdyA9IG15c3FsX2ZldGNoX2FycmF5KCRzcWxfaWRfcmVzdWx0LCBNWVNRTF9BU1NPQykpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRpZCA9ICRyb3dbJGtleV07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGVjaG8gJ2lkIGlzIHsnLiRpZC4nfSc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBidWxrX2V4ZWN1dGUgKCRkb20pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsPWFycmF5ICgpOyAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vY29tbWFuZCcpIGFzICRjb21tYW5kKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBmb3JlYWNoIChzZWxlY3Rfbm9kZXMgKCRkb20sICcvL3NxbCcpIGFzICRzcWwpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkdHNxbD0kc3FsLT5nZXRfY29udGVudCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBpZiAocHJlZ19tYXRjaF9hbGwgKCcvXCgoXHcrKVwpLycsICR0c3FsLCAkZmllbGRzKSkgICAgICAgICAKICAgICAgICAgICAgeyAgICAgICAgIAogICAgICAgICAgICAgICAgZm9yZWFjaCAoJGZpZWxkc1sxXSBhcyAkZmllbGQpICAgICAgICAgCiAgICAgICAgICAgICAgICB7ICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgJHZhbHVlPSRjb21tYW5kLT5nZXRfYXR0cmlidXRlICgkZmllbGQpOyAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICR0c3FsPXN0cl9yZXBsYWNlICgnKCcuJGZpZWxkLicpJywkdmFsdWUsJHRzcWwpOyAgICAgICAgIAogICAgICAgICAgICAgICAgfSAgICAgICAgIAogICAgICAgICAgICAgICAgZWNobyAkdHNxbCAuICJcbiI7ICAgICAgICAgCiAgICAgICAgICAgICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCR0c3FsKSA7ICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKZnVuY3Rpb24gc2F2ZV9ldmVudCAoJGRvbSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHM9YXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vZXZlbnQvZmllbGQnKSBhcyAkZmllbGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRmaWVsZHNbJGZpZWxkLT5nZXRfYXR0cmlidXRlICgnbmFtZScpXSA9IGh0bWxzcGVjaWFsY2hhcnMoJGZpZWxkLT5nZXRfY29udGVudCgpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHNbIlJvb21JRCJdICAgICAgICAgICA9IGFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZmllbGRzWyJDdXN0b21EYXRlcyJdICAgICAgPSBhcnJheSAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGZpZWxkc1siQ3VzdG9tUHJvcGVydGllcyJdID0gYXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHNbIkNhdGVnb3J5Il0gICAgICAgICA9IGFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZmllbGRzWyJDb21tZW50Il0gICAgICAgICAgPSBhcnJheSAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGZpZWxkc1siQ2FsZW5kYXIiXSAgICAgICAgID0gYXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vZXZlbnQvcm9vbXMvcmVjb3Jkc2V0L3JlY29yZC9maWVsZCcpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGZpZWxkcyBbIlJvb21JRCJdW10gPSAkZmllbGQtPmdldF9jb250ZW50KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9yZWFjaCAoc2VsZWN0X25vZGVzICgkZG9tLCAnLy9ldmVudC9jYXRlZ29yeS9yZWNvcmRzZXQvcmVjb3JkL2ZpZWxkJykgYXMgJGZpZWxkKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkZmllbGRzIFsiQ2F0ZWdvcnkiXVtdID0gJGZpZWxkLT5nZXRfY29udGVudCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vZXZlbnQvY2FsZW5kYXIvcmVjb3Jkc2V0L3JlY29yZC9maWVsZFtAbmFtZT0iQ2FsZW5kYXIiXScpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGZpZWxkcyBbIkNhbGVuZGFyIl1bXSA9ICRmaWVsZC0+Z2V0X2NvbnRlbnQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JlYWNoIChzZWxlY3Rfbm9kZXMgKCRkb20sICcvL2V2ZW50L2NvbW1lbnQvcmVjb3Jkc2V0L3JlY29yZCcpIGFzICRyZWNvcmQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRDb21tZW50VGV4dCA9IHNlbGVjdF9zaW5nbGVfbm9kZSAoJHJlY29yZCwgJy8vZmllbGRbQG5hbWU9IkNvbW1lbnRUZXh0Il0nKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRVc2VySUQgICAgICA9IHNlbGVjdF9zaW5nbGVfbm9kZSAoJHJlY29yZCwgJy8vZmllbGRbQG5hbWU9IlVzZXJJRCJdJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGlkICAgICAgICAgID0gc2VsZWN0X3NpbmdsZV9ub2RlICgkcmVjb3JkLCAnLy9maWVsZFtAbmFtZT0iaWQiXScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGlmICgkaWQtPmdldF9jb250ZW50KCk9PScwJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkZmllbGRzIFsiQ29tbWVudCJdW10gPSBhcnJheSgndGV4dCc9PiRDb21tZW50VGV4dC0+Z2V0X2NvbnRlbnQoKSwgJ3VzZXJpZCc9PiRVc2VySUQtPmdldF9jb250ZW50KCkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JlYWNoIChzZWxlY3Rfbm9kZXMgKCRkb20sICcvL2V2ZW50L3Byb3BlcnR5L3JlY29yZHNldC9yZWNvcmQnKSBhcyAkZmllbGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkbmFtZSA9IHNlbGVjdF9zaW5nbGVfbm9kZSAoJGZpZWxkLCAnLy9maWVsZFtAbmFtZT0icHJvcG5hbWUiXScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHZhbHVlID0gc2VsZWN0X3NpbmdsZV9ub2RlICgkZmllbGQsICcvL2ZpZWxkW0BuYW1lPSJwcm9wdmFsdWUiXScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgaWYgKCRuYW1lKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgaWYgKCR2YWx1ZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICRmaWVsZHNbIkN1c3RvbVByb3BlcnRpZXMiXVtdID0gYXJyYXkgKCRuYW1lLT5nZXRfY29udGVudCgpLCR2YWx1ZS0+Z2V0X2NvbnRlbnQoKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JlYWNoIChzZWxlY3Rfbm9kZXMgKCRkb20sICcvL2V2ZW50L2RhdGVzL3JlY29yZHNldC9yZWNvcmQvZmllbGRbQG5hbWU9IkN1c3RvbURhdGUiXScpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGZpZWxkcyBbIkN1c3RvbURhdGVzIl1bXSA9ICRmaWVsZC0+Z2V0X2NvbnRlbnQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRlYnBfZV9pZCAgICAgICAgICAgICAgICAgICAgID0gJGZpZWxkc1siSUQiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2V2ZW50bmFtZSAgICAgICAgICAgICAgPSAkZmllbGRzWyJFdmVudE5hbWUiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX3Jvb21pZCAgICAgICAgICAgICAgICAgPSAkZmllbGRzWyJSb29tSUQiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRlYnBfZV9mZWF0dXJlZCAgICAgICAgICAgICAgID0gJGZpZWxkc1siRmVhdHVyZWQiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2FwcHJvdmVkICAgICAgICAgICAgICAgPSAkZmllbGRzWyJBcHByb3ZlTG9naW4iXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2NyZWF0b3IgICAgICAgICAgICAgICAgPSAkZmllbGRzWyJDcmVhdGVMb2dpbiJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZWJwX2VfY29tbWVudCAgICAgICAgICAgICAgICA9ICRmaWVsZHNbIkNvbW1lbnQiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2V2ZW50c3RhcnR0aW1lIAkJCT0gZGF0ZSgnSDppOnMnLHN0cnRvdGltZSgkZmllbGRzWydFdmVudFN0YXJ0VGltZSddKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRlYnBfZV9ldmVudGVuZHRpbWUgCQkJPSBkYXRlKCdIOmk6cycsc3RydG90aW1lKCRmaWVsZHNbJ0V2ZW50RW5kVGltZSddKSk7ICAgICAgICAKICAgICRlYnBfZV9zZXR1cHN0YXJ0dGltZSAJCQk9IGRhdGUoJ0g6aTpzJyxzdHJ0b3RpbWUoJGZpZWxkc1snU2V0dXBTdGFydFRpbWUnXSkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZWJwX2Vfc2V0dXBlbmR0aW1lIAkJCT0gZGF0ZSgnSDppOnMnLHN0cnRvdGltZSgkZmllbGRzWydTZXR1cEVuZFRpbWUnXSkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi8vICAgICRlYnBfZV9ldmVudHN0YXJ0dGltZSAgICAgICAgID0gJGZpZWxkc1siRXZlbnRTdGFydFRpbWUiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAovLyAgICAkZWJwX2VfZXZlbnRlbmR0aW1lICAgICAgICAgICA9ICRmaWVsZHNbIkV2ZW50RW5kVGltZSJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi8vICAgICRlYnBfZV9zZXR1cHN0YXJ0dGltZSAgICAgICAgID0gJGZpZWxkc1siU2V0dXBTdGFydFRpbWUiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAovLyAgICAkZWJwX2Vfc2V0dXBlbmR0aW1lICAgICAgICAgICA9ICRmaWVsZHNbIlNldHVwRW5kVGltZSJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAjJGVicF9lX3VzZXJpZCAgICAgICAgICAgICAgICAgPSAkZmllbGRzWyJVc2VySWQiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2V2ZW50ZGF0ZSAgICAgICAgICAgICAgPSBkYXRlKCdZLW0tZCcsIHN0cnRvdGltZSgkZmllbGRzWyJFdmVudERhdGUiXSkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZWJwX2VfZW5kZGF0ZSAgICAgICAgICAgICAgICA9ICRmaWVsZHNbIlJlY3Vyc2VFbmREYXRlIl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRlYnBfZV9jdXN0b21kYXRlcyAgICAgICAgICAgID0gJGZpZWxkc1siQ3VzdG9tRGF0ZXMiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIyRlYnBfZV9yZW1vdmVkYXRlcyAgICAgICAgICAgID0gJGZpZWxkc1siUmVtb3ZlRGF0ZXMiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2F0dGVuZGVlcyAgICAgICAgICAgICAgPSAkZmllbGRzWyJBdHRlbmRlZXMiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX3VuaXQgICAgICAgICAgICAgICAgICAgPSAkZmllbGRzWyJSZWN1cnNlVW5pdCJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZWJwX2VfdHlwZSAgICAgICAgICAgICAgICAgICA9ICRmaWVsZHNbInR5cGUiXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2NhdGVnb3J5ICAgICAgICAgICAgICAgPSAkZmllbGRzWyJDYXRlZ29yeSJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZWJwX2VfY2FsZW5kYXIgICAgICAgICAgICAgICA9ICRmaWVsZHNbIkNhbGVuZGFyIl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRlYnBfZV9kZXNjcmlwdGlvbiAgICAgICAgICAgID0gJGZpZWxkc1siRGVzY3JpcHRpb24iXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2NvbW1lbnRzICAgICAgICAgICAgICAgPSAkZmllbGRzWyJDb21tZW50cyJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVicF9lX2N1c3RvbXByb3BzICAgICAgICAgICAgPSAkZmllbGRzWyJDdXN0b21Qcm9wZXJ0aWVzIl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgLy8gZmx1c2ggb2xkIGRhdGEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfZXZlbnRfY29tbWFuZHMgICA9IGFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsX2V2ZW50X3JvbGxiYWNrcyAgPSBhcnJheSAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKCiAgICAkZWJwX2NrX2FkbWl0ID0gJGVicF9lX2FwcHJvdmVkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJGVicF9lX2FwcHJvdmVkPT0iIikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGVicF9lX2FwcHJvdmVfbG9naW4gPSAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGVicF9lX2FwcHJvdmVfZGF0ZSAgPSAiIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRlYnBfZV9hcHByb3ZlX2xvZ2luID0gJGVicF9ja19hZG1pdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRlYnBfZV9hcHByb3ZlX2RhdGUgID0gZGF0ZSgiWS1tLWQiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAjICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmICgkZWJwX2VfdHlwZT09LTEpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRlYnBfZV9lbmRkYXRlID0gJyc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkZWJwX2VfY3VzdG9tZGF0ZXMgPSBhcnJheSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJGVicF9lX2VuZGRhdGU9PSIiKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkZWJwX2VfcmVjdXJyaW5nID0gMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGVicF9lX3JlY3VycmluZyA9IDE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAvLyBpbnNlcnQvdXBkYXRlIGV2ZW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsX2V2ZW50X3VwZGF0ZSA9ICJVUERBVEUgZXZlbnRzIHNldCAiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIgRXZlbnREYXRlID0gJyIgLiAkZWJwX2VfZXZlbnRkYXRlIC4gIicsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiIEV2ZW50U3RhcnRUaW1lID0gJyIgLiAkZWJwX2VfZXZlbnRzdGFydHRpbWUgLiAiJywiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIgRXZlbnRFbmRUaW1lID0gJyIgLiAkZWJwX2VfZXZlbnRlbmR0aW1lIC4gIicsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiIFNldHVwU3RhcnRUaW1lID0gJyIgLiAkZWJwX2Vfc2V0dXBzdGFydHRpbWUgLiAiJywiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIgU2V0dXBFbmRUaW1lID0gJyIgLiAkZWJwX2Vfc2V0dXBlbmR0aW1lIC4gIicsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiIEV2ZW50TmFtZSA9IFwiIiAuICRlYnBfZV9ldmVudG5hbWUgLiAiXCIsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiIEZlYXR1cmVkID0gXCIiIC4gJGVicF9lX2ZlYXR1cmVkIC4gIlwiLCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiBEZXNjcmlwdGlvbiA9IFwiIiAuICRlYnBfZV9kZXNjcmlwdGlvbiAuICJcIiwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIgQXBwcm92ZURhdGUgPSAnIiAuICRlYnBfZV9hcHByb3ZlX2RhdGUgLiAiJywiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIgQXBwcm92ZUxvZ2luID0gIiAuICRlYnBfZV9hcHByb3ZlX2xvZ2luIC4gIiwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIgQ29tbWVudHMgPSBcIiIgLiAkZWJwX2VfY29tbWVudHMgLiAiXCIsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiBBdHRlbmRlZXMgPSBcIiIgLiAkZWJwX2VfYXR0ZW5kZWVzIC4gIlwiLCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiBSb29tSUQgPSBcIiIgLiAkZWJwX2Vfcm9vbWlkWzBdIC4gIlwiLCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiBSZWN1cnNlVHlwZSA9IFwiIiAuICRlYnBfZV90eXBlIC4gIlwiLCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiBSZWN1cnNlVW5pdCA9IFwiIiAuICRlYnBfZV91bml0IC4gIlwiLCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gKCRlYnBfZV9lbmRkYXRlPT0nJz8gIlJlY3Vyc2VFbmREYXRlPW51bGwsIiA6ICIgUmVjdXJzZUVuZERhdGUgPSBcIiIgLiAkZWJwX2VfZW5kZGF0ZSAuICJcIiwiKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiIFJlY3VycmluZyA9IFwiIiAuICRlYnBfZV9yZWN1cnJpbmcgLiAiXCIgd2hlcmUgaWQgPSAiIC4gJGVicF9lX2lkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWxfZXZlbnRfaW5zZXJ0ID0gIklOU0VSVCBJTlRPIGV2ZW50cyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiAoRXZlbnREYXRlLEV2ZW50U3RhcnRUaW1lLEFwcHJvdmVEYXRlLEFwcHJvdmVMb2dpbixSb29tSUQsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiRXZlbnRFbmRUaW1lLFNldHVwU3RhcnRUaW1lLFNldHVwRW5kVGltZSxFdmVudE5hbWUsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgLiAiQ3JlYXRlRGF0ZSxDcmVhdGVMb2dpbixSZWN1cnJpbmcsQXR0ZW5kZWVzLFJlY3Vyc2VUeXBlLFJlY3Vyc2VVbml0LFJlY3Vyc2VFbmREYXRlLCBDb21tZW50cykgVkFMVUVTICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIignIiAuICRlYnBfZV9ldmVudGRhdGUgLiAiJywnIiAuICRlYnBfZV9ldmVudHN0YXJ0dGltZSAuICInLCciIC4gJGVicF9lX2FwcHJvdmVfZGF0ZSAuICInLCciIC4gJGVicF9lX2FwcHJvdmVfbG9naW4gLiAiJywgJyIgLiAkZWJwX2Vfcm9vbWlkWzBdIC4gIiciICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICIsJyIgLiAkZWJwX2VfZXZlbnRlbmR0aW1lIC4gIicsJyIgLiAkZWJwX2Vfc2V0dXBzdGFydHRpbWUgLiAiJywnIiAuICRlYnBfZV9zZXR1cGVuZHRpbWUgLiAiJywiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAuICJcIiIgLiAkZWJwX2VfZXZlbnRuYW1lIC4gIlwiLCciIC4gZGF0ZSgiWS1tLWQiKSAuICInLCIgLiAkZWJwX2VfY3JlYXRvciAuICIsICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIlwiIiAuICRlYnBfZV9yZWN1cnJpbmcgLiAiXCIsIFwiIiAuICRlYnBfZV9hdHRlbmRlZXMgLiAiXCIsXCIiIC4gJGVicF9lX3R5cGUgLiAiXCIsXCIiIC4gJGVicF9lX3VuaXQgLiAiXCIsICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIC4gIiIgLiAoJGVicF9lX2VuZGRhdGU9PScnPyJudWxsIjoiXCIiIC4gJGVicF9lX2VuZGRhdGUgLiAiXCIiKSAuICIsIFwiIiAuICRlYnBfZV9jb21tZW50cyAuICJcIikiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKCRlYnBfZV9pZCA+IDApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9ICRzcWxfZXZlbnRfdXBkYXRlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gc3FsX2RlbGV0ZV9mcm9tICgiamN0X2V2ZW50X2ZvbGRlcnMiLCAiZXZlbnRmayIsICRlYnBfZV9pZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gc3FsX2RlbGV0ZV9mcm9tICgiamN0X2V2ZW50X3VzZXJzIiwgImV2ZW50ZmsiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9IHNxbF9kZWxldGVfZnJvbSAoImV2ZW50X3Jvb21zIiwgImV2ZW50ZmsiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9IHNxbF9kZWxldGVfZnJvbSAoInJlY3Vyc29ycyIsICJldmVudEZrIiwgJGVicF9lX2lkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSBzcWxfZGVsZXRlX2Zyb20gKCJyZWN1cnNlY3VzdG9tIiwgImV2ZW50RmsiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9IHNxbF9kZWxldGVfZnJvbSAoImN1c3RvbXByb3BlcnRpZXMiLCAiZXZlbnRGayIsICRlYnBfZV9pZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gc3FsX2RlbGV0ZV9mcm9tICgiamN0X2V2ZW50X2NhbGVuZGFyIiwgImV2ZW50RmsiLCAkZWJwX2VfaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWxfZXZlbnRfaW5zZXJ0KSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgIHByaW50ICRzcWxfZXZlbnRfaW5zZXJ0LiJcbiI7IC8vLS0tLS0tLS0tLS0tLS0tLS0tXG4iOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9pZF9yZXN1bHQgPSBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCJTRUxFQ1QgSUQgRlJPTSBldmVudHMgT1JERVIgQlkgSUQgREVTQyIpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGlmKCRyb3cgPSBteXNxbF9mZXRjaF9hcnJheSgkc3FsX2lkX3Jlc3VsdCwgTVlTUUxfQVNTT0MpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkZWJwX2VfaWQgPSAkcm93WyJJRCJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBwcmludCAiLS0tLS0tLS0tLSIuJGVicF9lX2lkLiIgZXZlbnQgY3JlYXRlZFxuIjsgLy8tLS0tLS0tLS0tLS0tLS0tLS1cbiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgLy8gQWRkIHJvb21zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoJGU9MDskZTxjb3VudCgkZWJwX2Vfcm9vbWlkKTskZSsrKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9yb29tX2luc2VydCA9ICJJTlNFUlQgSU5UTyBldmVudF9yb29tcyAoZXZlbnRmayxyb29tZmspIFZBTFVFUyAoIiAuICRlYnBfZV9pZCAuICIsICIgLiAkZWJwX2Vfcm9vbWlkWyRlXSAuICIpIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSAkc3FsX3Jvb21faW5zZXJ0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLy8gQWRkIGNvbW1lbnRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoJGU9MDskZTxjb3VudCgkZWJwX2VfY29tbWVudCk7JGUrKykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkdGV4dCAgICAgID0gJGVicF9lX2NvbW1lbnRbJGVdWyd0ZXh0J107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkdXNlcmlkICAgID0gJGVicF9lX2NvbW1lbnRbJGVdWyd1c2VyaWQnXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfY29tbWVudF9pbnNlcnQgPSAiSU5TRVJUIElOVE8gZXZlbnRjb21tZW50cyAoZXZlbnRmayxVc2VySUQsQ29tbWVudERhdGUsQ29tbWVudFRleHQpIFZBTFVFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAoIiAuICRlYnBfZV9pZCAuICIsIFwiIiAuICR1c2VyaWQgLiAiXCIsIFwiIiAuIGRhdGUgKCdZLW0tZCBIOmk6cycpIC4gIlwiLCBcIiIgLiAkdGV4dCAuICJcIikiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9ICRzcWxfY29tbWVudF9pbnNlcnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi8vIEFkZCBjdXN0b20gcmVjdXJzb3JzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoJGU9MDskZTxjb3VudCgkZWJwX2VfY3VzdG9tZGF0ZXMpOyRlKyspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9yZWN1cnNlX2luc2VydCA9ICJJTlNFUlQgSU5UTyByZWN1cnNlY3VzdG9tIChFdmVudEZrLEN1c3RvbURhdGUpIFZBTFVFUyAoIiAuICRlYnBfZV9pZCAuICIsICciIC4gJGVicF9lX2N1c3RvbWRhdGVzWyRlXSAuICInKSI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gJHNxbF9yZWN1cnNlX2luc2VydDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAovLyBBZGQgY3VzdG9tIHByb3BlcnRpZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9yICgkZT0wOyRlPGNvdW50KCRlYnBfZV9jdXN0b21wcm9wcyk7JGUrKykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkY3N0X2ZpZWxkX25hbWUgPSAkZWJwX2VfY3VzdG9tcHJvcHNbJGVdWzBdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJGZpZWxkX3ZhbHVlICAgID0gJGVicF9lX2N1c3RvbXByb3BzWyRlXVsxXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfcHJvcGVydHlfaW5zZXJ0ID0gIklOU0VSVCBJTlRPIGN1c3RvbXByb3BlcnRpZXMgKGV2ZW50ZmsscHJvcG5hbWUscHJvcHZhbHVlKSBWQUxVRVMgKCIgLiAkZWJwX2VfaWQgLiAiLCBcIiIgLiAkY3N0X2ZpZWxkX25hbWUgLiAiXCIsIFwiIiAuICRmaWVsZF92YWx1ZSAuICJcIikiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWxfZXZlbnRfY29tbWFuZHNbXSA9ICRzcWxfcHJvcGVydHlfaW5zZXJ0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi8vIEFkZCBjYXRlZ29yaWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoJGU9MDskZTxjb3VudCgkZWJwX2VfY2F0ZWdvcnkpOyRlKyspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9jYXRlZ29yeV9pbnNlcnQgPSAiSU5TRVJUIElOVE8gamN0X2V2ZW50X2ZvbGRlcnMgKGV2ZW50ZmssZm9sZGVyZmspIFZBTFVFUyAoIiAuICRlYnBfZV9pZCAuICIsICciIC4gJGVicF9lX2NhdGVnb3J5WyRlXSAuICInKSI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gJHNxbF9jYXRlZ29yeV9pbnNlcnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAovLyBBZGQgY2FsZW5kYXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9yICgkZT0wOyRlPGNvdW50KCRlYnBfZV9jYWxlbmRhcik7JGUrKykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsX2NhbGVuZGFyX2luc2VydCA9ICJJTlNFUlQgSU5UTyBqY3RfZXZlbnRfY2FsZW5kYXIgKGV2ZW50ZmssQ2FsZW5kYXIpIFZBTFVFUyAoIiAuICRlYnBfZV9pZCAuICIsIFwiIiAuICRlYnBfZV9jYWxlbmRhclskZV0gLiAiXCIpIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsX2V2ZW50X2NvbW1hbmRzW10gPSAkc3FsX2NhbGVuZGFyX2luc2VydDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAovLyBsb2cgdHJhbnNhY3Rpb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbF9sb2dfaW5zZXJ0ID0gIklOU0VSVCBJTlRPIGxvZyAoRXZlbnRGaywgVXNlckZrLCBEYXRlTW9kaWZpZWQpIFZBTFVFUyAoIiAuICRlYnBfZV9pZCAuICIsICIgLiAkZWJwX2NrX2FkbWl0IC4gIiwgJyIgLiBkYXRlKCJZLW0tZCBIOmk6cyIpIC4gIicpIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbF9ldmVudF9jb21tYW5kc1tdID0gJHNxbF9sb2dfaW5zZXJ0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKCiAgICBmb3IgKCRlPTA7JGU8Y291bnQoJHNxbF9ldmVudF9jb21tYW5kcyk7JGUrKykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICBwcmludCAkc3FsX2V2ZW50X2NvbW1hbmRzWyRlXS4iXG4iOyAvLy0tLS0tLS0tLS0tLS0tLS0tLVxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbF9ldmVudF9jb21tYW5kc1skZV0pIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyAnRXZlbnQgaWQgaXMgeycgLiAkZWJwX2VfaWQgLiAnfSc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoKCmZ1bmN0aW9uIHZlcmlmeV9ldmVudCAoJGRvbSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHM9YXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHMgWyJDdXN0b21EYXRlcyJdID0gYXJyYXkoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGFyciA9IGFycmF5KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vdmVyaWZ5L2ZpZWxkJykgYXMgJGZpZWxkKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkZmllbGRzWyRmaWVsZC0+Z2V0X2F0dHJpYnV0ZSAoJ25hbWUnKV0gPSAkZmllbGQtPmdldF9jb250ZW50KCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vdmVyaWZ5L3Jvb21zL3JlY29yZHNldC9yZWNvcmQvZmllbGQnKSBhcyAkZmllbGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRhcnJbXSA9ICRmaWVsZC0+Z2V0X2NvbnRlbnQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JlYWNoIChzZWxlY3Rfbm9kZXMgKCRkb20sICcvL3ZlcmlmeS9kYXRlcy9yZWNvcmRzZXQvcmVjb3JkL2ZpZWxkW0BuYW1lPSJDdXN0b21EYXRlIl0nKSBhcyAkZmllbGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgCgkgICAgJGRhdGUgPSAkZmllbGQtPmdldF9jb250ZW50KCk7ICAgICAgICAgCgkvLwlpZiAoc3RydG90aW1lKCRkYXRlKSA+IHRpbWUoKSkgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkZmllbGRzIFsiQ3VzdG9tRGF0ZXMiXVtdID0gJGRhdGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHMgWyJDdXN0b21EYXRlcyJdW10gPSAkZmllbGRzWydFdmVudERhdGUnXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVfdDEgPSBkYXRlKCdIOmk6cycsc3RydG90aW1lKCRmaWVsZHNbJ0V2ZW50U3RhcnRUaW1lJ10pKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGVfdDIgPSBkYXRlKCdIOmk6cycsc3RydG90aW1lKCRmaWVsZHNbJ0V2ZW50RW5kVGltZSddKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRfR0VUWydjciddPSd0cnVlJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBldmVudF9yYW5nZSAoTlVMTCxOVUxMLE5VTEwsJGFycixOVUxMLE5VTEwsJGVfdDEsJGVfdDIsTlVMTCwneG1sJywkZmllbGRzIFsiQ3VzdG9tRGF0ZXMiXSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBnZXRfcHJvcGVydGllcygpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsPWFycmF5KCdzZWxlY3QgZXAuaWQsIHByb3BlcnR5X25hbWUscHJvcGVydHlfdHlwZSxwcm9wZXJ0eV9lYWNoLGVpLmRpc3BsYXlfdGV4dCxldC50eXBlX25hbWUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgZnJvbSBlYnBfZXZlbnRfcHJvcGVydGllcyBlcCBsZWZ0IG91dGVyIGpvaW4gZWJwX2V2ZW50X3Byb3BlcnR5X2l0ZW1zIGVpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBvbiBlaS5wcm9wZXJ0eWZrID0gZXAuaWQgaW5uZXIgam9pbiBlYnBfZXZlbnRfcHJvcGVydHlfdHlwZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgIGV0IG9uIGV0LmlkID0gZXAucHJvcGVydHlfdHlwZScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICByZXR1cm4gIHNxbF90ZXh0KCRzcWwsICd4bXMnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCgoKCgoKZnVuY3Rpb24gc2F2ZV9wcm9wZXJ0eSAoJGRvbSwgJHRhYmxlPSdlYnBfZXZlbnRfcHJvcGVydGllcycsICRub2RlPSdwcm9wZXJ0eScsICRrZXk9J2lkJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmaWVsZHM9YXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRpX2ZpZWxkcz1hcnJheSAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGlfdmFsdWVzPWFycmF5ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkdV92YWx1ZXM9YXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAndXBkYXRlICcuJHRhYmxlLicgc2V0ICc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcmVhY2ggKHNlbGVjdF9ub2RlcyAoJGRvbSwgJy8vJy4kbm9kZS4nL3IvZicpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJG49JGZpZWxkLT5nZXRfYXR0cmlidXRlICgnbicpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCRuPT0ka2V5KSAkaWQ9JGZpZWxkLT5nZXRfY29udGVudCgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZWxzZSBpZiAoJG49PSd0eXBlX25hbWUnKSB7IC8qIGRvIG5vdGhpbmcgKi8gfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVsc2UgaWYgKCRuPT0ncHJvcGVydHlfaXRlbScpICRpdGVtPSRmaWVsZC0+Z2V0X2NvbnRlbnQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkZmllbGRzWyRuXSA9ICRmaWVsZC0+Z2V0X2NvbnRlbnQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkdmFsdWVzW10gLj0gIlxuJG49JyIuJGZpZWxkc1skbl0uIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRpX2ZpZWxkc1tdIC49ICIiLiRuLiIiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRpX3ZhbHVlc1tdIC49ICInIi4kZmllbGRzWyRuXS4iJyI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmICgkaWQ+MCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzcWwgPSAndXBkYXRlICcuJHRhYmxlLicgc2V0ICcgLiBpbXBsb2RlICgnLCcsICR2YWx1ZXMpIC4gJyB3aGVyZSAnIC4gJGtleSAuICcgPSAnIC4gJGlkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZWNobyAkc3FsIC4gIlxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsID0gJ2luc2VydCBpbnRvICcuJHRhYmxlLicgKCcgLiBpbXBsb2RlICgnLCcsICRpX2ZpZWxkcykgLiAnKSB2YWx1ZXMgKCcgLiBpbXBsb2RlICgnLCcsICRpX3ZhbHVlcykgLiAnKSc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBlY2hvICRzcWwgLiAiXG4iOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsX2lkX3Jlc3VsdCA9IGZvcm1fZGF0YWJhc2VfcXVlcnkoIlNFTEVDVCAka2V5IEZST00gJHRhYmxlIE9SREVSIEJZICRrZXkgREVTQyIpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGlmICgkcm93ID0gbXlzcWxfZmV0Y2hfYXJyYXkoJHNxbF9pZF9yZXN1bHQsIE1ZU1FMX0FTU09DKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJGlkID0gJHJvd1ska2V5XTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZWNobyAnaWQgaXMgeycuJGlkLid9JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSBzcWxfZGVsZXRlX2Zyb20gKCJlYnBfZXZlbnRfcHJvcGVydHlfaXRlbXMiLCAicHJvcGVydHlmayIsICRpZCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvICRzcWwgLiAiXG4iOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRpdGVtPWV4cGxvZGUgKCcsJywkaXRlbSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoJGk9MDskaTxzaXplb2YoJGl0ZW0pOyRpKyspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGlmIChzdHJsZW4odHJpbSgkaXRlbVskaV0pKSA+IDApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJHNxbCA9ICdpbnNlcnQgaW50byBlYnBfZXZlbnRfcHJvcGVydHlfaXRlbXMgKGRpc3BsYXlfdmFsdWUsZGlzcGxheV90ZXh0LHByb3BlcnR5ZmspIHZhbHVlcyAoIicudHJpbSgkaXRlbVskaV0pLiciLCInLnRyaW0oJGl0ZW1bJGldKS4nIiwnLiRpZC4nKSc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZWNobyAkc3FsIC4gIlxuIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiB0cmFuc2Zvcm0gKCRkb20sICR0ZXh0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKCR4c2wgPSBkb214bWxfeHNsdF9zdHlsZXNoZWV0ICgkdGV4dCkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBpZiAoJHJlc3VsdCA9ICR4c2wtPnByb2Nlc3MoJGRvbSwgJHBhcmFtcykpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICByZXR1cm4gJHhzbC0+cmVzdWx0X2R1bXBfbWVtKCRyZXN1bHQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiBmYWxzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCgoKCiRwcm9maWxlX2RvYyA9ICd4bWwvcHJvZmlsZS54bWwnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiR0cmFuc2Zvcm1fZG9jID0gJ3hzbC9UTVBwcm9mbGlzdC54c2wnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgppZiAoJGRvbT1kb214bWxfb3Blbl9tZW0oJGlucHV0KSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkY29uZmlnPXNlbGVjdF9zaW5nbGVfbm9kZSAoJGRvbSwnLy9jb25maWcnKTsgICAgICAgICAgCiAgICAkYnVsaz1zZWxlY3Rfc2luZ2xlX25vZGUgKCRkb20sJy8vYnVsay5leGVjdXRlJyk7ICAgICAgICAgIAogICAgJG1haWw9c2VsZWN0X3NpbmdsZV9ub2RlICgkZG9tLCcvL2VtYWlsJyk7ICAgICAgICAgIAogICAgJHZlcmlmeT1zZWxlY3Rfc2luZ2xlX25vZGUgKCRkb20sJy8vdmVyaWZ5Jyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR1c2VybmQ9c2VsZWN0X3NpbmdsZV9ub2RlICgkZG9tLCcvL3VzZXInKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHJvb21uZD1zZWxlY3Rfc2luZ2xlX25vZGUgKCRkb20sJy8vc2F2ZXJvb20nKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkY2FsZW5kYXI9c2VsZWN0X3NpbmdsZV9ub2RlICgkZG9tLCcvL2NhbGVuZGFyJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRjYXRuZD1zZWxlY3Rfc2luZ2xlX25vZGUgKCRkb20sJy8vY2F0ZWdvcnknKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGV2ZW50bmQ9c2VsZWN0X3NpbmdsZV9ub2RlICgkZG9tLCcvL2V2ZW50Jyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRwcm9wbmQ9c2VsZWN0X3NpbmdsZV9ub2RlICgkZG9tLCcvL3Byb3BlcnR5Jyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcmVwb3J0PXNlbGVjdF9zaW5nbGVfbm9kZSAoJGRvbSwnLy9yZXBvcnQnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGV4cG5kPXNlbGVjdF9zaW5nbGVfbm9kZSAoJGRvbSwnLy9leHBvcnQvcnMnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHByb2ZuZD1zZWxlY3Rfc2luZ2xlX25vZGUgKCRkb20sJy8vKltsb2NhbC1uYW1lKCk9InByb2ZpbGUiXScpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJGV4cG5kKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAjJHM9c3RyX3JlcGxhY2UgKCc8ZXhwb3J0PicsJycsJGlucHV0KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRzPXN0cl9yZXBsYWNlICgnPC9leHBvcnQ+JywgJycsIHN0cl9yZXBsYWNlICgnPGV4cG9ydD4nLCcnLCRpbnB1dCkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKCRkb209ZG9teG1sX29wZW5fbWVtKCRzKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJGZwPWZvcGVuICgkdHJhbnNmb3JtX2RvYywgJ3InKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkZnI9ZnJlYWQgKCRmcCxmaWxlc2l6ZSgkdHJhbnNmb3JtX2RvYykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGZjbG9zZSAoJGZwKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkcHJvZm5kPXNlbGVjdF9zaW5nbGVfbm9kZSAoJGRvbSwnLy8qW2xvY2FsLW5hbWUoKT0icHJvZmlsZSJdJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgaWYgKCRwcm9mbmQpICRwcm9mbmQtPnNldF9hdHRyaWJ1dGUgKCd1c2VwYWdlcycsJ2ZhbHNlJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJG9wPSB0cmFuc2Zvcm0gKCRkb20sIHN0cl9yZXBsYWNlKCcmIzE2MDsnLCcgJywkZnIpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkb3V0ZG9jID0gdGltZSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRmcD1mb3BlbiAoJ3htbC8nIC4gJG91dGRvYywgJ3cnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBmd3JpdGUgKCRmcCwkb3ApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGZjbG9zZSAoJGZwKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBlY2hvICRvdXRkb2M7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlbHNlIGlmICgkY29uZmlnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgIAogICAgICAgIHNldF9jb25maWcgKCRkb20pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSBpZiAoJG1haWwpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBmb3JlYWNoIChzZWxlY3Rfbm9kZXMgKCRkb20sICcvL2hlYWRlcicpIGFzICRmaWVsZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAkdG8gICAgICAgICA9ICRmaWVsZC0+Z2V0X2F0dHJpYnV0ZSAoJ3RvJyk7ICAgICAgICAgICAKICAgICAgICAgICAgJGZyb20gICAgICAgPSAkZmllbGQtPmdldF9hdHRyaWJ1dGUgKCdmcm9tJyk7ICAgICAgICAgIAogICAgICAgICAgICAkc3ViamVjdCAgICA9ICRmaWVsZC0+Z2V0X2F0dHJpYnV0ZSAoJ3N1YmplY3QnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZm9yZWFjaCAoc2VsZWN0X25vZGVzICgkZG9tLCAnLy9ib2R5JykgYXMgJGZpZWxkKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICRib2R5PSRmaWVsZC0+Z2V0X2NvbnRlbnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIH0gICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAKICAgICAgICAgICAgICAgICAKICAgICAgICAkbWFpbF9zZW50ID0gbWFpbCgkdG8sICRzdWJqZWN0LCAkYm9keSwgIlRvOiBUaGUgUmVjZWl2ZXIgPCIgLiAkdG8gLiAiPlxuIiAuICAgICAgICAgICAKICAgICJGcm9tOiBUaGUgU2VuZGVyIDxzZW5kZXJAc29tZS5uZXQ+XG4iIC4gICAgICAgICAgIAogICAgIk1JTUUtVmVyc2lvbjogMS4wXG4iIC4gICAgICAgICAgIAogICAgIkNvbnRlbnQtdHlwZTogdGV4dC9odG1sOyBjaGFyc2V0PWlzby04ODU5LTEiKTsgICAgICAgICAgCiAgICAgICAgICAgICAgIAogICAgICAgIGVjaG8gJG1haWxfc2VudCA/ICdNYWlsIHdhcyBzZW50IHRvICcgLiAkdG8gOiAiTWFpbCBmYWlsZWQgKCIgLiBzdHJsZW4gKCRib2R5KSAuICIgYnl0ZXMpIjsgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSBpZiAoJGJ1bGspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgCiAgICAgICAgYnVsa19leGVjdXRlICgkZG9tKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgaWYgKCRwcm9mbmQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRkb20tPmR1bXBfZmlsZSgkcHJvZmlsZV9kb2MsIGZhbHNlLCB0cnVlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVjaG8gJ1Byb2ZpbGUgd2FzIHNhdmVkISc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgaWYgKCRldmVudG5kKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAKCQkkY2xvbmVpZCAgID0gJGV2ZW50bmQtPmdldF9hdHRyaWJ1dGUgKCdjbG9uZWlkJyk7IAoJCSRjbG9uZWRhdGUgPSAkZXZlbnRuZC0+Z2V0X2F0dHJpYnV0ZSAoJ2Nsb25lZGF0ZScpOyAgICAgCgkJaWYgKHN0cmxlbigkY2xvbmVpZCkgPiAwKQoJCXsKCQkJJGNsb25lZGF0ZSA9IGRhdGUgKCdZLW0tZCcsIHN0cnRvdGltZSgkY2xvbmVkYXRlKSk7CiAgICAgICAgICAgICRzcWwgPSAiREVMRVRFIEZST00gcmVjdXJzZWN1c3RvbSBXSEVSRSBDdXN0b21EYXRlPSciIC4gJGNsb25lZGF0ZSAuICInIGFuZCBFdmVudEZrPSciIC4gJGNsb25laWQgLiAiJyI7ICBlY2hvICAgIlxuJHNxbFxuIjsgCgkJCWZvcm1fZGF0YWJhc2VfcXVlcnkgKCRzcWwpOyAgCgkJfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBzYXZlX2V2ZW50ICgkZG9tKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgaWYgKCRwcm9wbmQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHNhdmVfcHJvcGVydHkgKCRkb20pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSBpZiAoJHJlcG9ydCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAKICAgICAgICBzYXZlX2dlbmVyaWMgKCRkb20sICdjdXN0b21yZXBvcnRzJywgJ3JlcG9ydCcsICdpZCcpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgaWYgKCRjYWxlbmRhcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAKICAgICAgICBzYXZlX2dlbmVyaWMgKCRkb20sICdlYnBfZXZlbnRfY2FsZW5kYXJzJywgJ2NhbGVuZGFyJywgJ2lkJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgaWYgKCRjYXRuZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgc2F2ZV9nZW5lcmljICgkZG9tLCAnZXZlbnRmb2xkZXJzJywgJ2NhdGVnb3J5JywgJ2lkJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSBpZiAoJHJvb21uZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgc2F2ZV9nZW5lcmljICgkZG9tLCAncm9vbXMnLCAnc2F2ZXJvb20nKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlbHNlIGlmICgkdXNlcm5kKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBzYXZlX2dlbmVyaWMgKCRkb20pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVsc2UgaWYgKCR2ZXJpZnkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHZlcmlmeV9ldmVudCAoJGRvbSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBzYXZlX2V2ZW50ICgkZG9tKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVjaG8gJ09LJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3JlYWQnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaGVhZGVyKCJQcmFnbWE6IHB1YmxpYyIpOyAvLyByZXF1aXJlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaGVhZGVyKCJFeHBpcmVzOiAwIik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBoZWFkZXIoIkNhY2hlLUNvbnRyb2w6IG11c3QtcmV2YWxpZGF0ZSwgcG9zdC1jaGVjaz0wLCBwcmUtY2hlY2s9MCIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaGVhZGVyKCJDYWNoZS1Db250cm9sOiBwcml2YXRlIixmYWxzZSk7IC8vIHJlcXVpcmVkIGZvciBjZXJ0YWluIGJyb3dzZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaGVhZGVyKCJDb250ZW50LXR5cGU6IGFwcGxpY2F0aW9uL3ZuZC5tcy1leGNlbCIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGhlYWRlcigiQ29udGVudC1EaXNwb3NpdGlvbjogYXR0YWNobWVudDsgZmlsZW5hbWU9XCJlYiIgLiBnZXQoJ2RvYycpIC4gIi4iIC4gZ2V0KCdvcCcpIC4gIlwiOyIgKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRpbmRvYyA9ICd4bWwvJyAuICBnZXQoJ2RvYycpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkZnA9Zm9wZW4gKCRpbmRvYywgJ3InKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGZyPWZyZWFkICgkZnAsZmlsZXNpemUoJGluZG9jKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZjbG9zZSAoJGZwKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyAkZnI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHVubGluayAoJGluZG9jKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2dldF9jb25maWcnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGdldF9jb25maWcoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdyYW5nZScpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgIAoJaGVhZGVyICgnQ29udGVudC10eXBlOiB0ZXh0L3htbCcpOyAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvIGRhdGVfcmFuZ2UoJGlkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3Byb2ZpbGUnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJGZwPWZvcGVuICgkcHJvZmlsZV9kb2MsICdyJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRmcj1mcmVhZCAoJGZwLGZpbGVzaXplKCRwcm9maWxlX2RvYykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmY2xvc2UgKCRmcCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gJGZyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0ncHJvcCcpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvIHByb3BfbGlzdCgkaWQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nbG9naW4nKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBzcWxfdGV4dChhcnJheSgic2VsZWN0ICogZnJvbSBldmVudF91c2VycyB3aGVyZSB1c2VyaWQ9JyIuZ2V0KCd1aWQnKS4iJyBhbmQgcGFzc3dvcmQ9JyIuZ2V0KCdwYXNzJykuIiciKSwgJ3htbCcpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICR0ZW1wICAgPSBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCJTRUxFQ1QgSUQgRlJPTSBldmVudF91c2VycyBXSEVSRSB1c2VyaWQ9JyIuZ2V0KCd1aWQnKS4iJyBhbmQgcGFzc3dvcmQ9JyIuZ2V0KCdwYXNzJykuIiciKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgd2hpbGUoJHJvdyA9IG15c3FsX2ZldGNoX2FycmF5KCR0ZW1wLCBNWVNRTF9BU1NPQykpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICRpZD0kcm93WyJJRCJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsID0gc3FsX2RlbGV0ZV9mcm9tICgiZWJwX2lwIiwgImlwIiwgJF9TRVJWRVJbJ1JFTU9URV9BRERSJ10pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaWYgKGlzc2V0KCRfR0VUWydrdSddKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBpZiAoZ2V0KCdrdScpPT0nMScpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCdpbnNlcnQgaW50byBlYnBfaXAgKGlwLHVzZXJmayxyZW1lbWJlcikgdmFsdWVzICgiJy4kX1NFUlZFUlsnUkVNT1RFX0FERFInXS4nIiwgJy4kaWQuJywgJy5nZXQoJ2twJykuJyknKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3JhdycpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHF1ZXJ5ICA9ICdzZWxlY3QgKiBmcm9tIGV2ZW50cyc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHJlc3VsdCA9IGZvcm1fZGF0YWJhc2VfcXVlcnkoJHF1ZXJ5KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRtYXggCT0gIG15c3FsX251bV9yb3dzKCRyZXN1bHQpIDsKCSRzdGFydCAgPSBnZXQoJ3N0YXJ0JywgMCk7CglpZiAoJHN0YXJ0ID4gMCkKCXsKCSAgICAgJG9rPW15c3FsX2RhdGFfc2VlayAoJHJlc3VsdCwkc3RhcnQpOwoJfQoJJGk9MDsKICAgIHdoaWxlKCRyb3cgPW15c3FsX2ZldGNoX2Fzc29jKCRyZXN1bHQpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHRlc3QgPSBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCdzZWxlY3QgKiBmcm9tICBqY3RfZXZlbnRfY2FsZW5kYXIgd2hlcmUgRXZlbnRGaz0nLiRyb3dbJ0lEJ10pOwoJCW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gICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdkdW1wJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWw9J3NlbGVjdCAqIGZyb20gJy4kaWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGlmICgkaWQ9PSdyb29tcycpICRzcWwgPSAnc2VsZWN0IHIuKiwgY291bnQoZXZlbnRmaykgYXMgRXZlbnRDb3VudCBmcm9tIHJvb21zIHIgbGVmdCBvdXRlciBqb2luICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRfcm9vbXMgZXIgb24gci5JRCA9IGVyLnJvb21mayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXAgYnkgcm9vbW5hbWUnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAoJGlkPT0nY3VzdG9tcmVwb3J0cycpIGVjaG8gIjwhLS0gdXRmOF9lbmNvZGVkIC0tPlxuIiAuICBzcWxfdGV4dChhcnJheSgkc3FsKSwgJzEyOCcpOyAgICAgICAgCgllbHNlIGVjaG8gc3FsX3RleHQoYXJyYXkoJHNxbCksIGdldCgnb3AnLCAnY3N2JykpOyAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdwcm9wZXJ0eScpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvIGdldF9wcm9wZXJ0aWVzICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nY2F0ZWdvcnknKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBldmVudF9jYXRlZ29yeSAoJGlkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2V2ZW50JykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICMgZXZlbnRfcmFuZ2UgKCRzMT1OVUxMLCRzMj1OVUxMLCRuZXh0NT1OVUxMLCRybT1OVUxMLCRubT1OVUxMKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvIGV2ZW50X3JhbmdlIChnZXQoJ3MxJyksZ2V0KCdzMicpLE5VTEwsaXNzZXQoJF9HRVRbJ3JtJ10pP2FycmF5KGdldCgncm0nKSk6TlVMTCxnZXQoJ25tJyksZ2V0KCd1cycpLGdldCgndDEnKSxnZXQoJ3QyJyksZ2V0KCdkYScpLGdldCgnb3AnLCAnY3N2JykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J25leHQ1JykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICMgIE5VTEwsTlVMTCxOVUxMLE5VTEwsTlVMTCwtMixnZXQoJ29wJywgJ2NzdicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gZXZlbnRfcmFuZ2UgKE5VTEwsTlVMTCx0cnVlLCBOVUxMLE5VTEwsTlVMTCxOVUxMLE5VTEwsLTIsIGdldCgnb3AnLCAnY3N2JykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0ncm9vbWxpc3QnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBldmVudF9yb29tX2xpc3QoJGlkKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdyb29tY2hhbmdlJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkgKCBzcWxfZGVsZXRlX2Zyb20gKCJldmVudF9yb29tcyIsICJldmVudGZrIiwgZ2V0KCdpZCcpKSApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcm9vbXMgPSBleHBsb2RlICgnLCcsZ2V0KCdyb29tcycpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5ICgnVVBEQVRFIGV2ZW50cyBTRVQgUm9vbUlEID0gJyAuICRyb29tc1swXSAuICcgV0hFUkUgSUQ9JyAuIGdldCgnaWQnKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JlYWNoICgkcm9vbXMgYXMgJHJvb20pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkc3FsID0gIklOU0VSVCBJTlRPIGV2ZW50X3Jvb21zIChldmVudGZrLHJvb21maykgVkFMVUVTICgiIC4gZ2V0KCdpZCcpIC4gIiwgIiAuICRyb29tIC4gIikiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3Njb3BlJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gZXZlbnRfZGF0ZV9zY29wZShzdHJ0b3RpbWUoJHMxKSwgc3RydG90aW1lKCRzMiksICR0cCwgJHVpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2RlbGV0ZV9ldmVudCcpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBkZWxldGVfZXZlbnQgKGdldCgnaWQnKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdkZWxldGVfdXNlcicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBkZWxldGVfdXNlciAoZ2V0KCdpZCcpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdkZWxldGVfcm9vbScpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkkc3FsID0gc3FsX2RlbGV0ZV9mcm9tICgicm9vbXMiLCAiSUQiLCBnZXQoJ2lkJykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAoJZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nZGVsZXRlX2F0dGFjaG1lbnQnKSAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAKICAgICAkc3FsID0gc3FsX2RlbGV0ZV9mcm9tICgiZWJwX2V2ZW50X2F0dGFjaG1lbnRzIiwgImlkIiwgIGdldCgnaWQnKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdkZWxldGVfY2FsZW5kYXInKSAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAKICAgICAkc3FsID0gc3FsX2RlbGV0ZV9mcm9tICgiZWJwX2V2ZW50X2NhbGVuZGFycyIsICJpZCIsICBnZXQoJ2lkJykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2RlbGV0ZV9yZXBvcnQnKSAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAKICAgICAkc3FsID0gc3FsX2RlbGV0ZV9mcm9tICgiY3VzdG9tcmVwb3J0cyIsICJpZCIsICBnZXQoJ2lkJykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdzcWxfY2FsZW5kYXInKSAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gc3FsX2NhbGVuZGFyIChnZXQoJ2lkJyksZ2V0KCdzdGFydCcpLGdldCgnZW5kJykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdzcWxfZmVhdHVyZWQnKSAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgIAogICAgc3FsX2ZlYXR1cmVkICgpOyAgICAgIyBzcWxfY2FsZW5kYXIgKCRpZCwkc3RhcnQsJGVuZCkgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdkZWxldGVfY3VzdG9tJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAiREVMRVRFIEZST00gcmVjdXJzZWN1c3RvbSBXSEVSRSBDdXN0b21EYXRlPSciIC4gZ2V0KCdkYXRlJykgLiAiJyBhbmQgRXZlbnRGaz0nIiAuIGdldCgnZXZlbnRmaycpIC4gIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyAneycuZ2V0KCdldmVudGZrJykuJ30nOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3Jlc2V0X2V2ZW50X2RhdGUnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9ICJVUERBVEUgZXZlbnRzIHNldCBFdmVudERhdGU9JyIgLiBnZXQoJ2RhdGUnKSAuICInIFdIRVJFIElEPSciIC4gZ2V0KCdpZCcpIC4gIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyAneycuZ2V0KCdpZCcpLid9JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdyZXNldF9ldmVudF90aW1lJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAiVVBEQVRFIGV2ZW50cyBzZXQgIiAuIGdldCgndHlwZScsJ0V2ZW50JykgLiAiIiAuIGdldCgnbWFya2VyJykgLiAiVGltZT0nIiAuIGdldCgndmFsdWUnKSAuICInIFdIRVJFIElEPSciIC4gZ2V0KCdpZCcpIC4gIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyAneycuZ2V0KCdpZCcpLid9JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdyZXNldF9ldmVudF90aW1lcycpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsID0gIlVQREFURSBldmVudHMgc2V0IEV2ZW50U3RhcnRUaW1lPSciIC4gc3RyMnRpbWUoIGdldCgnZXMnKSApIC4gIicsICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRXZlbnRFbmRUaW1lPSciIC4gc3RyMnRpbWUoIGdldCgnZWUnKSApIC4gIicsICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2V0dXBTdGFydFRpbWU9JyIgLiBzdHIydGltZSggZ2V0KCdzcycpICkgLiAiJywgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXR1cEVuZFRpbWU9JyIgLiBzdHIydGltZSggZ2V0KCdzZScpICkgLiAiJyAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdIRVJFIElEPSciIC4gZ2V0KCdpZCcpIC4gIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyAneycuZ2V0KCdpZCcpLid9JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nc3dhcF9ldmVudF9kYXRlJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAiREVMRVRFIEZST00gcmVjdXJzZWN1c3RvbSBXSEVSRSBDdXN0b21EYXRlPSciIC4gZ2V0KCdvbGQnKSAuICInIGFuZCBFdmVudEZrPSciIC4gZ2V0KCdpZCcpIC4gIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKSA7ICAgIGVjaG8gKCRzcWwpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAiREVMRVRFIEZST00gcmVjdXJzZWN1c3RvbSBXSEVSRSBDdXN0b21EYXRlPSciIC4gZ2V0KCdkYXRlJykgLiAiJyBhbmQgRXZlbnRGaz0nIiAuIGdldCgnaWQnKSAuICInIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICBlY2hvICgkc3FsKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsID0gIklOU0VSVCBJTlRPIHJlY3Vyc2VjdXN0b20gKEN1c3RvbURhdGUsRXZlbnRGaykgVkFMVUVTICgnIiAuIGdldCgnZGF0ZScpIC4gIicsICciIC4gZ2V0KCdpZCcpIC4gIicpIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICBlY2hvICJcblxuIiAuICRzcWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gJ3snLmdldCgnaWQnKS4nfSc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nZGVsZXRlX2NhdGVnb3J5JykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSBzcWxfZGVsZXRlX2Zyb20gKCJldmVudGZvbGRlcnMiLCAiaWQiLCBnZXQoJ2lkJykpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nZGVsZXRlX3Byb3BlcnR5JykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSBzcWxfZGVsZXRlX2Zyb20gKCJlYnBfZXZlbnRfcHJvcGVydGllcyIsICJpZCIsIGdldCgnaWQnKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvICRzcWwgLiAiXG4iOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpIDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9IHNxbF9kZWxldGVfZnJvbSAoImVicF9ldmVudF9wcm9wZXJ0eV9pdGVtcyIsICJwcm9wZXJ0eWZrIiwgZ2V0KCdpZCcpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gJHNxbCAuICJcbiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCkgOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3NlcnZlcicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgcHJpbnRfciAoJF9TRVJWRVIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nYXR0YWNoJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9ICdzZWxlY3QgaWQsIGV2ZW50ZmssIGF0dGFjaG1lbnRfbmFtZSwgYXR0YWNobWVudF90eXBlLCBhdHRhY2htZW50X3NpemUgZnJvbSBlYnBfZXZlbnRfYXR0YWNobWVudHMgd2hlcmUgZXZlbnRmaz0nIC4gZ2V0ICgnaWQnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gc3FsX3RleHQoYXJyYXkoJHNxbCksICd4bWwnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdjaGVjaycpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9ICJzZWxlY3QgdS51c2VyaWQsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAoIENBU0UgV0hFTiBlLnJlbWVtYmVyID0gMCBUSEVOICcnIEVMU0UgdS5wYXNzd29yZCBFTkQgKSBhcyBwYXNzd29yZCxlLnJlbWVtYmVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBmcm9tIGV2ZW50X3VzZXJzIHUgaW5uZXIgam9pbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZWJwX2lwIGUgb24gdS5JRCA9IGUudXNlcmZrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICB3aGVyZSBlLmlwID0gJyIuJF9TRVJWRVJbJ1JFTU9URV9BRERSJ10uIiciOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgZWNobyBzcWxfdGV4dChhcnJheSgkc3FsKSwgJ3htbCcpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0nbG9nJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsID0gJ3NlbGVjdCBsLmlkLCBsLlVzZXJmaywgREFURV9GT1JNQVQobC5EYXRlTW9kaWZpZWQsICIlVyAlYiAlZSwgJVkgJXIiKSBFZGl0RGF0ZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIENPTkNBVChldS5GaXJzdE5hbWUsIiAiLGV1Lkxhc3ROYW1lKSBhcyBGdWxsTmFtZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGZyb20gbG9nIGwgaW5uZXIgam9pbiBldmVudF91c2VycyBldSBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGwuVXNlcmZrID0gZXUuSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB3aGVyZSBsLmV2ZW50ZmsgPSAnLmdldCgnaWQnKS4nICc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gc3FsX3RleHQoYXJyYXkoJHNxbCksICd4bWwnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2NvbW1lbnRzJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsID0gJ3NlbGVjdCBlYy5pZCwgZWMuVXNlcklELCBEQVRFX0ZPUk1BVChlYy5Db21tZW50RGF0ZSwgIiVXICViICVlLCAlWSAlciIpIENvbW1lbnREYXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBlYy5Db21tZW50VGV4dCwgZWMuRXZlbnRGSywgQ09OQ0FUKGV1LkZpcnN0TmFtZSwiICIsZXUuTGFzdE5hbWUpIGFzIEZ1bGxOYW1lICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgZnJvbSBldmVudGNvbW1lbnRzIGVjIGlubmVyIGpvaW4gZXZlbnRfdXNlcnMgZXUgb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBlYy5Vc2VySUQgPSBldS5JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHdoZXJlIGVjLmV2ZW50ZmsgPSAnLmdldCgnaWQnKS4nICc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gc3FsX3RleHQoYXJyYXkoJHNxbCksICd4bWwnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2NvbmZsaWN0cycpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9ICJzZWxlY3QgQ3VzdG9tRGF0ZSBhcyBFdmVudERhdGUgZnJvbSByZWN1cnNlY3VzdG9tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHdoZXJlIGV2ZW50ZmsgPSAiLmdldCgnaWQnKS4iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgdW5pb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgc2VsZWN0IEV2ZW50RGF0ZSBmcm9tIGV2ZW50cyB3aGVyZSBpZCA9ICIuZ2V0KCdpZCcpLiIiOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvIGRhdGVfcmFuZ2UoTlVMTCwgJHNxbCk7IC8vc3FsX3RleHQoYXJyYXkoJHNxbCksICd4bWwnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2V2ZW50cm9vbWxpc3QnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAnc2VsZWN0IGVyLmV2ZW50ZmssIGVyLnJvb21maywgci5Sb29tTmFtZSBmcm9tIGV2ZW50X3Jvb21zIGVyIGlubmVyIGpvaW4gcm9vbXMgciBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHIuSUQ9ZXIucm9vbWZrIHdoZXJlIGV2ZW50ZmsgaW4gKCcuZ2V0KCdpZCcpLicpIG9yZGVyIGJ5IGVyLmV2ZW50ZmsnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBlY2hvIHNxbF90ZXh0KGFycmF5KCRzcWwpLCAneG1sJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdmZWF0dXJlJykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkc3FsID0gJ3VwZGF0ZSBldmVudHMgc2V0IEZlYXR1cmVkID0gJyAuIGdldCgndmFsdWUnKSAuICcgd2hlcmUgaWQgPSAnIC4gZ2V0KCdpZCcpIC4gJyAnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRzcWwpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAplbHNlIGlmICgkYWN0aW9uPT0ndXNlcnBlcm0nKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAndXBkYXRlIGV2ZW50X3VzZXJzIHNldCBNYXNrID0gJyAuIGdldCgnbWFzaycpIC4gJyB3aGVyZSBpZCA9ICcgLiBnZXQoJ2lkJykgLiAnICc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHNxbCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdjYWxlbmRhcicpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9ICdzZWxlY3Qgai4qIGZyb20gamN0X2V2ZW50X2NhbGVuZGFyIGoKCSAgICAgICAgaW5uZXIgam9pbiBlYnBfZXZlbnRfY2FsZW5kYXJzIGUgb24gZS5pZCA9IGouQ2FsZW5kYXIgd2hlcmUgai5ldmVudGZrIGluICgnIC4gZ2V0KCdpZCcpIC4gJykgICc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gc3FsX3RleHQoYXJyYXkoJHNxbCksICd4bWwnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J2JhY2t1cCcpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBiYWNrdXBfZGIgKGdldCgnaWQnKSwgZ2V0KCdrZXknKSwgZ2V0KCdzdGFydCcpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J21ldHJpY3MnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRzcWwgPSAnc2VsZWN0ICIvd2Vic2VydmljZXMvaW1hZ2VzL2V4cGxvcmVyL0NhbGVuZGFyX3NtMi5naWYiIGFzIGljb24sICJldmVudGNvdW50IiBhcyBuYW1lLCBjb3VudChpZCkgYXMgbnVtIGZyb20gZXZlbnRzIHVuaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHNlbGVjdCAiL3dlYnNlcnZpY2VzL2ltYWdlcy9leHBsb3Jlci9pY29fYXZhdGFyLmdpZiIgYXMgaWNvbiwgInVzZXJjb3VudCIgYXMgbmFtZSwgY291bnQoaWQpIGFzIG51bSBmcm9tIGV2ZW50X3VzZXJzIHVuaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHNlbGVjdCAiL3dlYnNlcnZpY2VzL2ltYWdlcy94dWkuZ3JhcGguZ2lmIiBhcyBpY29uLCAicm9vbWNvdW50IiBhcyBuYW1lLCBjb3VudChpZCkgYXMgbnVtIGZyb20gcm9vbXMgdW5pb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgc2VsZWN0ICIvd2Vic2VydmljZXMvaW1hZ2VzL2kucy5wcm9wZXJ0eS5naWYiIGFzIGljb24sICJwcm9wY291bnQiIGFzIG5hbWUsIDAgYXMgbnVtJzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZWNobyBzcWxfdGV4dChhcnJheSgkc3FsKSwgJ3htcycpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgaWYgKCRhY3Rpb249PSdkdW1wX3JlY3Vyc2UnKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAKCWR1bXBfcmVjdXJzZSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKZWxzZSBpZiAoJGFjdGlvbj09J3JlbWluZCcpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgJHNxbCA9ICJzZWxlY3QgdS51c2VyaWQsdS5wYXNzd29yZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBmcm9tIGV2ZW50X3VzZXJzIHUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB3aGVyZSBFTWFpbCA9ICciLmdldCgnZScpLiInIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICR0ZW1wID0gZm9ybV9kYXRhYmFzZV9xdWVyeSgkc3FsKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgaWYgKCRyb3cgPSBteXNxbF9mZXRjaF9hcnJheSgkdGVtcCwgTVlTUUxfQVNTT0MpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAkdXNlcmlkPSRyb3dbInVzZXJpZCJdOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgJHBhc3N3b3JkPSRyb3dbInBhc3N3b3JkIl07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgbWFpbChnZXQoJ2UnKSwgJ1Bhc3N3b3JkIHJlbWluZGVyJywgJ0V2ZW50QnVpbGRlciBVc2VyIElEOiAnLiR1c2VyaWQuJywgUGFzc3dvcmQ6ICcgLiAkcGFzc3dvcmQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGVjaG8gJ1lvdXIgcGFzc3dvcmQgaGFzIGJlZW4gbWFpbGVkIHRvICcgLiBnZXQoJ2UnKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgIGV4aXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGVjaG8gJ1lvdXIgcGFzc3dvcmQgY291bGQgbm90IGJlIGZvdW5kISc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCmVsc2UgICAgICAgICAgCnsgICAgICAgICAKICAgIGVjaG8gJ05vIHZhbGlkIHhtbCBvciBxdWVyeSBzdHJpbmcgd2FzIHJlY2VpdmVkJzsgICAgICAgICAKICAgIHByaW50X3IgKCRfR0VUKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgCgpmdW5jdGlvbiBzdHIydGltZSAoJHgpIHsgcmV0dXJuIGRhdGUgKCdIOmk6cycsIHN0cnRvdGltZSgkeCkpOyB9ICAgICAgIAoKZnVuY3Rpb24gZ2V0ICgkbiwkdj1OVUxMKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuIGlzc2V0KCRfR0VUWyRuXSkgPyAkX0dFVFskbl0gOiAkdjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIHRleHQxMjggKCR0ZXh0KQp7CiAgICAkbz1hcnJheSgpOwoJZm9yICgkaT0wOyRpPHN0cmxlbigkdGV4dCk7JGkrKykKCXsKCSAgICAkYz1zdWJzdHIoJHRleHQsJGksMSk7CgkJJG9bXT0kYzsKCX0gCglyZXR1cm4gaW1wbG9kZSAoJycsICRvKTsKfQoKCi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCiAgICAgICAgICAgICRzcGVjaWFsID0gYXJyYXkgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgJG91dHB1dCAuPSBzcWxfdGV4dCAoJHNwZWNpYWwsICR0eXBlLCB0cnVlLCBOVUxMLCAwLCBOVUxMLCBOVUxMLCAnY2FsZW5kYXJzJyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKi8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo/Pg==","ZWItY29uZmlnLnR4dA=="=>"Y29uZmlnW2RhdGFiYXNlXT1kYjI2NTI1Nzk0Mgpjb25maWdbc2VydmVyXT1kYjE3MjkucGVyZm9yYS5uZXQKY29uZmlnW3VzZXJdPWRibzI2NTI1Nzk0Mgpjb25maWdbcGF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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGdsb2JhbCAkZmF0YWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAvKiBBY2Nlc3NpbmcgU1FMLVNlcnZlciBhbmQgcXVlcnlpbmcgdGFibGUgKi8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBNWVNRTF9DT05ORUNUKCRzZXJ2ZXIsICR1c2VyLCAkcGFzc3dvcmQpIG9yIGRpZSAoICRmYXRhbC4iIFNlcnZlciAkc2VydmVyIHVucmVhY2hhYmxlICR1c2VyLyRwYXNzd29yZCIgKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIE1ZU1FMX1NFTEVDVF9EQigkZGF0YWJhc2UpIG9yIGRpZSAoICRmYXRhbC4iIERhdGFiYXNlIHVucmVhY2hhYmxlIiApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAkcmVzdWx0ID0gQE1ZU1FMX1FVRVJZKHN0cmlwc2xhc2hlcygkcXVlcnkpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICBpZiAoJHJlc3VsdCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJcHJpbnQgKCI8ZXJyb3I+PCFbQ0RBVEFbPHhtcD48aW1nIHNyYz0naHR0cDovL3d3dy5jeWJlcjgubmV0L3dlYnNlcnZpY2VzL2ltYWdlcy9leHBsb3Jlci9leGNsYW1hdGlvbi5naWYnIGFsaWduPXRvcD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCQkJCTxiPkEgZmF0YWwgTXlTUUwgZXJyb3Igb2NjdXJlZDwvYj4uXG48YnIgLz5RdWVyeTo8eG1wPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCQkJCSIgLiAkcXVlcnkgLiAiPC94bXA+PGJyIC8+XG5FcnJvcjogKCIgLiBteXNxbF9lcnJubygpIC4gIikgPHhtcD4iIC4gbXlzcWxfZXJyb3IoKSAuICI8L3htcD48YnI+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJCQk8QSBIUkVGPSdqYXZhc2NyaXB0Omhpc3RvcnkuYmFjaygpJz5QbGVhc2UgdHJ5IGFnYWluPC9BPl1dPjwvZXJyb3I+Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJTVlTUUxfQ0xPU0UoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgkJZXhpdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgcmV0dXJuICRyZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIE1ZU1FMX0NMT1NFKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGZvcm1fZGF0YWJhc2VfcXVlcnkoJHF1ZXJ5KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgZ2xvYmFsICRzZXJ2ZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIGdsb2JhbCAkdXNlcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgZ2xvYmFsICRwYXNzd29yZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgZ2xvYmFsICRkYXRhYmFzZTsgICAgICAKICAgCiAgICRmcD1mb3BlbiAoR0xPQkFMX0NPTkZJRywncicpOwogICAkZnI9ZnJlYWQgKCRmcCwgZmlsZXNpemUoR0xPQkFMX0NPTkZJRykpOwogICBmY2xvc2UgKCRmcCk7CiAgIGZvcmVhY2ggKGV4cGxvZGUgKCJcbiIsJGZyKSBhcyAkbGluZSkKICAgewoJCXBhcnNlX3N0cigkbGluZSk7IAogICB9CiAgICRzZXJ2ZXIgCQk9ICRjb25maWcgWydzZXJ2ZXInXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICR1c2VyIAkJPSAkY29uZmlnIFsndXNlciddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgJHBhc3N3b3JkIAk9ICRjb25maWcgWydwYXNzd29yZCddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgJGRhdGFiYXNlCT0gJGNvbmZpZyBbJ2RhdGFiYXNlJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICByZXR1cm4gZ2VuZXJpY19kYXRhKCRzZXJ2ZXIsJHVzZXIsJHBhc3N3b3JkLCRkYXRhYmFzZSwkcXVlcnkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCgoKPz4KPGh0bWw+CjxoZWFkPiAKPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJzdHlsZS5jc3MiLz4gIAo8dGl0bGU+VW50aXRsZWQgRG9jdW1lbnQ8L3RpdGxlPiAKPHNjcmlwdCBsYW5ndWFnZT0iamF2YXNjcmlwdCIgc3JjPSJodHRwOi8vd3d3LmN5YmVyOC5uZXQvd2Vic2VydmljZXMvZnJhbWV3b3JrL2NvcmUvYXBwbGljYXRpb24uanMiPjwvc2NyaXB0Pgo8c2NyaXB0IGxhbmd1YWdlPSJqYXZhc2NyaXB0Ij4gCnZhciBwYWdlc2l6ZSA9IDEwMDsKdmFyIGFwcCA9IEFwcGxpY2F0aW9uLmNyZWF0ZSAoIkV2ZW50QnVpbGRlciBCYWNrdXAiKTsKYXBwLnVzaW5nIChmZWF0aGVyd2VpZ2h0LmNvcmUpOyAKYXBwLnVzaW5nIChmZWF0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Kz0gJ0NsaWNraW5nIHRoZSAiUmVwb3J0IGl0IiBidXR0b24gd2lsbCBzYXZlIHlvdSB0aGUgdGltZSBvZiBzZW5kaW5nIHVzIGFuIGVtYWlsLCAnOyAgCiAgICBodG0rPSAnYnV0IHdpbGwgZW5zdXJlIHRoYXQgd2VcJ3JlIG5vdGlmaWVkIGFib3V0IHlvdXIgaXNzdWUuPC9ibG9ja3F1b3RlPiAnOwogICAgdmFyIHRtcCxkMz1bXTsKICAgIGZvciAodmFyIHggaW4gd2luZG93LnJzcykKICAgIHsgIAogICAgICAgIGlmICh3aW5kb3cucnNzW3hdLmxlbmd0aCA+IDApCiAgICAgICAgewogICAgICAgICAgICB0bXA9W107CiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gcmUpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIG1tID0gcmVbaV0uZXhlYyAod2luZG93LnJzc1t4XSk7CiAgICAgICAgICAgICAgICB0bXBbaV0gPSAobW0/bW1bMV06JycpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIAogICAgICAgICAgICBpZiAodG1wWydkZXNjJ10ubGVuZ3RoPjApCgkJCXsKCQkJCWlmICghIGQzW3RtcFsncGFnZSddXSApIGQzW3RtcFsncGFnZSddXSA9IFtdOwogICAgICAgICAgICAgICAgZDNbdG1wWydwYWdlJ11dLnB1c2ggKHRtcCk7IAoJCQl9CiAgICAgICAgfQogICAgfSAKICAgIAogICAgCiAgICBmb3IgKHZhciB4IGluIGQzKQogICAgeyAKICAgICAgICBodG0gKz0nPHRhYmxlIGNlbGxwYWRkaW5nPSI0IiBjZWxsc3BhY2luZz0iMSIgd2lkdGg9IjY1JSIgYWxpZ249Y2VudGVyPjx0cj4nOwogICAgICAgIGh0bSArPSAnPHRkIGNvbHNwYW49IjIiPjxicj48YnI+PGI+JyArIHggKyAnPC9iPjwvdGQ+JzsKICAgICAgICBodG0gKz0nPC90cj4nOyAKICAgICAgICBvZGQgPSBmYWxzZTsKICAgICAgICBmb3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UpBWD09bnVsbCkgCiAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHJldHVybiBmYWxzZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAKICAgICAgICBlbHNlIAogICAgICAgIHsKICAgICAgICAgICAgdGhhdC5BSkFYLm9ucmVhZHlzdGF0ZWNoYW5nZSA9IGZ1bmN0aW9uKCkgCiAgICAgICAgICAgIHsgIAogICAgICAgICAgICAgICAgaWYgKHRoYXQuQUpBWC5yZWFkeVN0YXRlPT00KSAKICAgICAgICAgICAgICAgIHsgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgdGhhdC51cGRhdGluZz1mYWxzZTsgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICB0aGF0LmNhbGxiYWNrKHRoYXQuQUpBWC5yZXNwb25zZVRleHQsIHRoYXQuaWQpOyAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgdGhhdC5BSkFYPW51bGw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgdGhhdC51cGRhdGluZyA9IG5ldyBEYXRlKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIGlmICgvcG9zdC9pLnRlc3QocG9zdE1ldGhvZCkpIAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICB2YXIgdXJpPXVybENhbGwrJz8nK3RoYXQudXBkYXRpbmcuZ2V0VGltZSgpOwogICAgICAgICAgICAgICAgdGhhdC5BSkFYLm9wZW4oIlBPU1QiLCB1cmksIHRydWUpOwogICAgICAgICAgICAgICAgdGhhdC5BSkFYLnNldFJlcXVlc3RIZWFkZXIoIkNvbnRlbnQtdHlwZSIsICJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQiKTsKICAgICAgICAgICAgICAgIHRoYXQuQUpBWC5zZXRSZXF1ZXN0SGVhZGVyKCJDb250ZW50LUxlbmd0aCIsIHBhc3NEYXRhLmxlbmd0aCk7CiAgICAgICAgICAgICAgICB0aGF0LkFKQVguc2VuZChwYXNzRGF0YSk7CiAgICAgICAgICAgIH0gCiAgICAgICAgICAgIGVsc2UgCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHZhciB1cmk9dXJsQ2FsbDsKICAgICAgICAgICAgICAgIHRoYXQuQUpBWC5vcGVuKCJHRVQiLCB1cmksIHRydWUpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB0aGF0LkFKQVguc2VuZChudWxsKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICB9ICAgICAgICAgICAgICAKICAgICAgICAgICAgcmV0dXJuIHRydWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgfQogIHZhciB1cmxDYWxsID0gdXJsOyAgICAgICAgCiAgdGhpcy5jYWxsYmFjayA9IGNhbGxiYWNrRnVuY3Rpb24gfHwgZnVuY3Rpb24gKCkgeyB9Owp9CgoKCgp2YXIgSGlkZVRpbWVTZWxlY3RvciA9IGZ1bmN0aW9uICgpCnsKCXZhciBkcz1nZXRFbGVtZW50ICgnZHRpbWVzZWxlY3QnKTsKCWlmIChkcykgZHMuc3R5bGUuZGlzcGxheT0nbm9uZSc7Cgl2YXIgZHI9Z2V0RWxlbWVudCAoJ2Ryb29tc2VsZWN0Jyk7CglpZiAoZHIpIGRyLnN0eWxlLmRpc3BsYXk9J25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G51bSAoaSkKewoJdmFyIHg9aSUxMDsKCXZhciBzPWkrJ3RoJzsKCXN3aXRjaCAoeCkKCXsKCQljYXNlIDE6CgkJCXM9aSsnc3QnOwoJCQlicmVhazsgCgkJY2FzZSAyOgoJCQlzPWkrJ25kJzsKCQkJYnJlYWs7IAoJCWNhc2UgMzoKCQkJcz1pKydyZCc7CgkJCWJyZWFrOyAKCX0KCXJldHVybiBzOwp9","bXZjLmNvbnRyb2xsZXIuanM="=>"77u/dmFyIENvbnRyb2xsZXIgPSB7IAovL3Byb3BlcnRpZXMgICAgCiAgICBRdWVyeVN0cmluZyAgICAgICAgICAgICA6IHsgfSwKICAgIHdhdGNodGltZXIgICAgICAgICAgICAgIDogbnVsbCwKICAgIHdhdGNoYXJyYXkgICAgICAgICAgICAgIDogW10sICAKICAgIEluY2x1ZGVkRmllbGRzICAgICAgICAgIDogMCwKICAgIFNpZGViYXJTdGF0ZSAgICAgICAgICAgIDogMSwgCiAgICBTaWRlYmFyVXNlckRpc3BsYXlTdGF0ZSA6IDAsIAogICAgRXZlbnRPcHRpb25QYW5lbFN0YXRlICAgOiAxMCwgCiAgICBTZWxlY3RlZENhdGVnb3J5ICAgICAgICA6IC0xLAogICAgU2VsZWN0ZWRSZXBvcnQgICAgICAgICAgOiAtMSwKICAgIFNlbGVjdGVkQ2FsZW5kYXIgICAgICAgIDogLTEsCiAgICBTZWxlY3RlZFByb3BlcnR5ICAgICAgICA6IC0xLAogICAgU2VsZWN0ZWRSb29tICAgICAgICAgICAgOiAtMSwKICAgIFNlbGVjdGVkVXNlciAgICAgICAgICAgIDogLTEsCiAgICBMYXN0UmVxdWVzdFVSTCAgICAgICAgICA6IG51bGwsCiAgICBMYXN0TGlzdFVSTCAgICAgICAgICAgICA6IG51bGwsCiAgICBEZWZhdWx0RmllbGRzICAgICAgICAgICA6IDI3NjcsCiAgICBTb3J0RmllbGQgICAgICAgICAgICAgICA6IG51bGwsCiAgICBNYWlsVG8gICAgICAgICAgICAgICAgICA6IG51bGwsCglwYWdlc2l6ZQkJCQk6IDI1LAogICAgQ29uZmxpY3REYXRlcyAgICAgICAgICAgOiBbXSwKICAgIEV2ZW50T3B0aW9uUGFuZWxzICAgICAgIDogWydvcHRpb25zJywncHJvcGVydGllcycsJ2NhdGVnb3JpZXMnLCdjYWxlbmRhcnMnLCdhdHRhY2htZW50cycsJ2NvbW1lbnRzJ10sCiAgICBzdGFyb24gICAgICAgICAgICAgICAgICA6ICJodHRwOi8vd3d3Lmdvb2dsZS5jb20vcmVhZGVyL3VpLzg3NjEzNDA0OS1zdGFyX2FjdGl2ZS5wbmciLAogICAgc3Rhcm9mZiAgICAgICAgICAgICAgICAgOiAiaHR0cDovL3d3dy5nb29nbGUuY29tL3JlYWRlci91aS85NDU4MjIyNDgtc3Rhcl9pbmFjdGl2ZS5wbmciLAogICAgCiAgICAKICAgIAogICAgZG93YXRjaCA6IGZ1bmN0aW9uICgpCiAgICB7ICAgCiAgICAgICAgdmFyIG5vdyA9IG51bGw7ICAKICAgICAgICBmb3IgKHZhciB4IGluIHRoaXMud2F0Y2hhcnJheSkKICAgICAgICB7IAogICAgICAgICAgICBub3cgPSB0aGlzLndhdGNoYXJyYXlbeF0ub2JqZWN0WyB0aGlzLndhdGNoYXJyYXlbeF0ucHJvcGVydHkgXTsgIAogICAgICAgICAgICBpZiAobm93ICE9IHRoaXMud2F0Y2hhcnJheVt4XS52YWx1ZSkKICAgICAgICAgICAgeyAKICAgICAgICAgICAgICAgIHRoaXMud2F0Y2hhcnJheVt4XS5jYWxsYmFjayAobm93LCB0aGlzLndhdGNoYXJyYXlbeF0ucHJvcGVydHkpOyAKICAgICAgICAgICAgfQogICAgICAgICAgICB0aGlzLndhdGNoYXJyYXlbeF0udmFsdWUgPSBub3c7CiAgICAgICAgfQogICAgfSwKICAgIAogICAgd2F0Y2ggOiBmdW5jdGlvbiAob2JqZWN0LCBwcm9wZXJ0eSwgY2FsbGJhY2spCiAgICB7CiAgICAgICAgdmFyIGRhdGEgPSB7IG9iamVjdCA6IG9iamVjdCwgcHJvcGVydHkgOiBwcm9wZXJ0eSwgY2FsbGJhY2sgOiBjYWxsYmFjayB9OwogICAgICAgIGRhdGFbJ3ZhbHVlJ10gPSBvYmplY3RbcHJvcGVydHldOwogICAgICAgIHRoaXMud2F0Y2hhcnJheS5wdXNoIChkYXRhKTsKICAgIH0sICAKICAgIAogICAgcGFyc2VVcmwgOiBmdW5jdGlvbiAodXJsKQogICAgewogICAgICAgIHZhciB2YWx1ZSwgZGF0YSA9IHVybC5zcGxpdCAoJyMnKTsKICAgICAgICB0aGlzLlF1ZXJ5U3RyaW5nID0geyB9OwogICAgICAgIGlmIChkYXRhWzFdKQogICAgICAgIHsKICAgICAgICAgICAgdmFsdWUgPSBkYXRhWzFdLnNwbGl0ICgnLycpOwogICAgICAgICAgICBmb3IgKHZhciB4PTA7eDx2YWx1ZS5sZW5ndGg7eCs9MikKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgdGhpcy5RdWVyeVN0cmluZ1t2YWx1ZVt4XV0gPSB2YWx1ZVt4KzFdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiB0aGlzLlF1ZXJ5U3RyaW5nOwogICAgfSAsCgogICAgY3JlYXRlUXVlcnlTdHJpbmcgOiBmdW5jdGlvbiAgKG5hbWV2YWx1ZSkKICAgIHsgCiAgICAgICAgdmFyIHRtcD17IH0sb3V0cHV0PVtdOwogICAgICAgIGZvciAodmFyIHggaW4gQ29udHJvbGxlci5RdWVyeVN0cmluZykgdG1wW3hdID0gQ29udHJvbGxlci5RdWVyeVN0cmluZ1t4XTsKICAgICAgICBmb3IgKHZhciB4IGluIG5hbWV2YWx1ZSkgdG1wW3hdID0gbmFtZXZhbHVlW3hdOwogICAgICAgIGZvciAodmFyIHggaW4gdG1wKSBvdXRwdXQucHVzaCAoeCArICcvJyArIHRtcFt4XS5yZXBsYWNlICgvXHMrL2csICcrJykpOwogICAgICAgIHJldHVybiBvdXRwdXQuam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mVudE9wdGlvblBhbmVsU3RhdGUpOyAKICAgICAgICBDb250cm9sbGVyLlJlbG9hZCgnZGNldmVudCcpOwogICAgfSwKICAgIAogICAgUmVsb2FkICAgOiBmdW5jdGlvbiAoKSAKICAgIHsgCiAgICAgICAgdmFyIGRjLCBhcmdzPUNvbnRyb2xsZXIuUmVsb2FkLmFyZ3VtZW50cyxpZD1bXTsKICAgICAgICBmb3IgKHZhciB4PTA7eDxhcmdzLmxlbmd0aDt4KyspCiAgICAgICAgewogICAgICAgICAgICBkYz1nZXRFbGVtZW50IChhcmdzW3hdKTsKICAgICAgICAgICAgaWYgKGRjKSBpZC5wdXNoIChkYy5zY3JvbGxUb3ApOwogICAgICAgIH0gCiAgICAgICAgQ29udHJvbGxlci5tdmNldmVudHNbd2luZG93Lm12Y2V2ZW50XS5pbnZva2UoKTsgCiAgICAgICAgZm9yICh2YXIgeD0wO3g8aWQubGVuZ3RoO3grKykKICAgICAgICB7CiAgICAgICAgICAgIGRjPWdldEVsZW1lbnQgKGFyZ3NbeF0pOwogICAgICAgICAgICBpZiAoZGMpIGRjLnNjcm9sbFRvcCA9IGlkW3hdOwogICAgICAgIH0gCiAgICB9LCAgCgogICAgc3RhcnQgOiBmdW5jdGlvbiAgKCkKICAgIHsgCgkgICAgdGhpcy53YXRjaHRpbWVyID0gd2luZG93LnNldEludGVydmFsICgnQ29udHJvbGxlci5kb3dhdGNoKCknLCAyNTApOwogICAgfSAKIH0gIAoKdmFyIFJlYWR5U3RhdGUgPSB7ICAgICAKICAgIFNFTkRJTkcgICAgIDogMSwgIAogICAgTE9BRElORyAgICAgOiAyLCAKICAgIFBST0NFU1NJTkcgIDogMywgCiAgICBET05FICAgICAgICA6IDQKfSAgCiAKd2luZG93LnByb2Nlc3NtZXNzYWdlICAgICAgID0gJ1Byb2Nlc3NpbmcgcmVzcG9uc2UuLi4nOyAgCndpbmRvdy5ldmVudGxpc3R4bWwgICAgICAgICA9IG51bGw7ICAKd2luZG93LmN1cnJlbnRldmVudCAgICAgICAgID0gbnVsbDsgIAp3aW5kb3cuaW52b2ljZSAgICAgICAgICAgICAgPSBudWxsOyAgCndpbmRvdy5kb20gICAgICAgICAgICAgICAgICA9IFhtbERvY3VtZW50LmNyZWF0ZSgpOyAgCndpbmRvdy5odHRwICAgICAgICAgICAgICAgICA9IFhtbEh0dHAuY3JlYXRlKCk7ICAKd2luZG93LnJlcXVlc3QgICAgICAgICAgICAgID0gQ3VzdG9tQUpBWENvbm5lY3Rvci5jcmVhdGUoKTsKd2luZG93LnJvb21zICAgICAgICAgICAgICAgID0gW107ICAKd2luZG93LmZvbGRlcnMgICAgICAgICAgICAgID0gW107ICAKd2luZG93LnJlcG9ydHMgICAgICAgICAgICAgID0gW107ICAKd2luZG93LnByb3BlcnRpZXMgICAgICAgICAgID0gW107ICAKd2luZG93LmNhbGVuZGFycyAgICAgICAgICAgID0gW107ICAKd2luZG93LmxvZ2dlZGludXNlciAgICAgICAgID0gW107ICAKd2luZG93LmV2ZW50bG9nICAgICAgICAgICAgID0gW107ICAKd2luZG93LnVzZXJzICAgICAgICAgICAgICAgID0gW107IAp3aW5kb3cucHJvcGVydHlfdHlwZXMgICAgICAgPSBbXTsgIAp3aW5kb3cuZ3JpZHZpZXcgICAgICAgICAgICAgPSBkZ3JpZC5MSVNUOyAgCndpbmRvdy5zZWFyY2htb2RlICAgICAgICAgICA9IDA7IAp2YXIgQVBQTElDQVRJT05fTkFNRSAgICAgICAgPSAnRXZlbnRCdWlsZGVyIFBlcnNvbmFsIEVkaXRpb252Ni4xJzsgICAKdmFyIExPQ0FUSU9OX1BBVEhfTkFNRSAgICAgID0gbG9jYXRpb24ucGF0aG5hbWUuc3BsaXQgKCcvJyk7ICAgICAgIApMT0NBVElPTl9QQVRIX05BTUUucG9wKCk7CkxPQ0FUSU9OX1BBVEhfTkFNRQkJCT0gTE9DQVRJT05fUEFUSF9OQU1FLmpvaW4gKCcvJyk7CnZhciBEQVRBX1VSTCAgICAgICAgICAgICAgICA9I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CiAgICB9IAogICAgIAogICAgCiAgICBpZiAoZXZlbnQgPSBDb250cm9sbGVyLlF1ZXJ5U3RyaW5nWydrZXknXSkKICAgIHsvLyB3aGVuIGxvYWRpbmcgZnJvbSBDbGljaywgYXNzdW1lIGRhdGFzb3VyY2VzIGFyZSBsb2FkZWQgICAKICAgICAvLyBhbmQgbG9hZCBPbkNsaWNrIG9iamVjdCBldmVudCBoYW5kbGVycyBmaXJzdAogICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7IEV2ZW50RGF0YUdyaWRFZGl0IChudWxsLCBldmVudCkgIDsgfSAgCiAgICB9IAogICAgIAogICAgaWYgKGNvbW1hbmQgPSBHZXREYXRhc291cmNlRnVuY3Rpb25Gcm9tVVJMICgpKQogICAgewogICAgICAgIHJldHVybiBjb21tYW5kOwogICAgfQogICAgCiAgICAKICAgIHJldHVybiBmYWxzZTsKfSAgCgoKCmZ1bmN0aW9uIEdldERhdGFzb3VyY2VGdW5jdGlvbkZyb21VUkwgKCkKeyAgCiAgICB2YXIgYWN0aW9uICA9IENvbnRyb2xsZXIuUXVlcnlTdHJpbmdbJ3JlcG9ydCddOwogICAgdmFyIGlkICAgICAgPSBDb250cm9sbGVyLlF1ZXJ5U3RyaW5nWydpZCddOwogICAgdmFyIHZpZXcgICAgPSBDb250cm9sbGVyLlF1ZXJ5U3RyaW5nWyd2aWV3J107IAogICAgCiAgICBpZiAoYWN0aW9uKQogICAgewogICAgICAgIHN3aXRjaChhY3Rpb24pCiAgICAgICAgewogICAgICAgICAgICBjYXNlICduZXh0NSc6CiAgICAgICAgICAgICAgICByZXR1cm4gTG9hZE5leHQ1RXZlbnRzOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgJ2ZlYXR1cmUnOgogICAgICAgICAgICAgICAgcmV0dXJuIExvYWRGZWF0dXJlZEV2ZW50czsgCiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnbXknOgogICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHsgU2VhcmNoRXZlbnRzQnlVc2VyKHdpbmRvdy5sb2dnZWRpbnVzZXIuaWQpOyB9CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnYnl1c2VyJzoKICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7IFNlYXJjaEV2ZW50c0J5VXNlcihpZCk7IH0gCiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAnc2VhcmNoJzoKICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7IFNlYXJjaEV2ZW50c0V4ICgpOyB9CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmIChpZCkKICAgIHsKICAgICAgICBzd2l0Y2godmlldykKICAgICAgICB7CiAgICAgICAgICAgIGNhc2UgJ3Jvb21saXN0JzoKICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7IENvbnRyb2xsZXIuU2VsZWN0ZWRSb29tID0gaWQ7IFJvb21MaXN0RXZlbnQuaW52b2tlKCk7ICB9OwogICAgICAgICAgICAgICAgYnJlYWs7IAogICAgICAgICAgICBjYXNlICd1c2VybGlzdCc6CiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkgeyBDb250cm9sbGVyLlNlbGVjdGVkVXNlciA9IGlkOyBVc2VyTGlzdEV2ZW50Lmludm9rZSgpOyAgfTsKICAgICAgICAgICAgICAgIGJyZWFrOyAKLy8gICAgICAgICAgICBjYXNlICdzZXR0aW5nc3BhZ2UnOgovLyAgICAgICAgICAgICAgICBjb25maXJtKFJlbmRlclNldHRpbmdzUGFnZS5TZXR0aW5nKQovLyAgICAgICAgICAgICAgICBzd2l0Y2goUmVuZGVyU2V0dGluZ3NQYWdlLlNldHRpbmcpCi8vICAgICAgICAgICAgICAgIHsKLy8gICAgICAgICAgICAgICAgICAgIGNh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AgIHdoaWxlICghc2kuZW9mKSAgCiAgICAgICAgICAgICAgICB7ICAgICAKCQkJCQlpZiAoc2kuZGF0YSYmc2kuZGF0YVsnRXZlbnROYW1lJ10pCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZXZlbnRzLnB1c2ggKHNpLmRhdGEpOyAgCiAgICAgICAgICAgICAgICAgICAgc2kubW92ZW5leHQgKCk7ICAKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBtaz13aW5kb3cuZG9tLmdldEVsZW1lbnRzQnlUYWdOYW1lICgnbWFya2VyJyk7IAogICAgICAgICAgICAgICAgZm9yICh2YXIgbT0wO208bWsubGVuZ3RoO20rKykKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmRlYnVndGV4dCArPSBta1ttXS5nZXRBdHRyaWJ1dGUgKCduYW1lJykrJzonK21rW21dLmdldEF0dHJpYnV0ZSAoJ3ZhbHVlJykrJzxicj4nOwogICAgICAgICAgICAgICAgfSAgIAogICAgICAgICAgICB9ICBlbHNlIGNvbmZpcm0gKCJDb3VsZCBub3Qgb3BlbiBjYWxlbmRhciB4bWwhIik7ICAKICAgICAgICAgICAgQ29udHJvbGxlci5DbGVhcigpOyAgICAKCQkJCgkJCSAKCQkJCgkJCXRoaXMudGltZXN0YW1wLnByb2Nlc3NlZCA9IG5ldyBEYXRlKCk7CiAgICAgICAgICAgIHRoaXMucmVuZGVyY2FsZW5kZXIgKCk7CiAgICAgICAgfSAgIAogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIHZhciBodG09JyZuYnNwO0xvYWRpbmcgZXZlbnRzIGZvciAnICsgdGhpcy5jYWxlbmRhcl9uYW1lICsgJy4uLicKICAgICAgICAgICAgc3dpdGNoICh3aW5kb3cuaHR0cC5yZWFkeVN0YXRlKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBjYXNlIFJlYWR5U3RhdGUuU0VORElORzoKICAgICAgICAgICAgICA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AnT3B0aW9ucyc7IAoJcGFuZWwuc3RhdGUgICAgID0gTG9jYWxnZXRtb2RlKCdvcHRpb25zJyk/J3VwJzonZG93bic7IAoJaWYgKExvY2FsZ2V0bW9kZSgnb3B0aW9ucycpKQoJeyAKICAgICAgICBvcHRpb25ib2R5LmNvcHkgKHsKICAgICAgICAgICAgICAgICAgICAgICAgJ3VzZXInIDogd2luZG93LmxvZ2dlZGludXNlci5pZCwKICAgICAgICAgICAgICAgICAgICAgICAgJ2ZlYXR1cmVkJyA6IGRvbS5GZWF0dXJlZD8nY2hlY2tlZCc6JycsCiAgICAgICAgICAgICAgICAgICAgICAgICdlbmFibGVkJyA6IGRpcywKICAgICAgICAgICAgICAgICAgICAgICAgJ0F0dGVuZGVlcycgOiBkb20uQXR0ZW5kZWVzIHx8ICcwJywKICAgICAgICAgICAgICAgICAgICAgICAgJ2FwcHJvdmVyJyA6IGRvbS5BcHByb3ZlTG9naW4gJiYgZG9tLkFwcHJvdmVMb2dpbiA+IDAgPyAoICcgYnkgJyArIEdldFVzZXJOYW1lIChkb20uQXBwcm92ZUxvZ2luKSApIDogJyAobm90IGFwcHJvdmVkKScsCiAgICAgICAgICAgICAgICAgICAgICAgICdhcHByb3ZlZCcgOiBkb20uQXBwcm92ZUxvZ2luICYmIGRvbS5BcHByb3ZlTG9naW4gPiAwID8nY2hlY2tlZCc6JycgCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoJICAgIHBhbmVsLmNvbnRlbnQrPSBvcHRpb25ib2R5LmRyYXcoKTsgIAoJfQoJaHRtICs9IHBhbmVsLmRyYXcgKCk7CgkgCgkKCWlmKCBDb250cm9sbGVyLmRvbUNsb25lICkKCXsKCQkvLyBDb25mbGljdHMgdGFibGUKCQlodG0rPSAnPHRhYmxlIHdpZHRoPSIzMDAiIGNsYXNzPSJiZXZlbGJsdWUiIGlkPSJwYW5lbF9jbG9uZSIgY2VsbHNwYWNpbmc9MCBjZWxscGFkZGluZz01IGJnY29sb3I9IiNEM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hPXBhcnNlSW50KGRvbS5JRCkpCgkJCXsKCQkJICAgIHZhciBzdGFydHRpbWU9dGltZUlucHV0KGRvbS5Db25mbGljdHNbcF1bJ0V2ZW50U3RhcnRUaW1lJ10pOwoJCQkgICAgdmFyIGVuZHRpbWU9dGltZUlucHV0KGRvbS5Db25mbGljdHNbcF1bJ0V2ZW50RW5kVGltZSddKTsKCQkJICAgIHZhciBkYXRlPWRvbS5Db25mbGljdHNbcF1bJ0V2ZW50RGF0ZSddOwoJCQkgICAgdmFyIGtleT1kb20uQ29uZmxpY3RzW3BdWydJRCddOwoJCQkgICAgdmFyIHJvdD1kb20uQ29uZmxpY3RzW3BdWydSZWN1cnNlVHlwZSddfHwnLTEnOwoJCQkgICAgdmFyIGNvbmZsaWN0cz1udWxsOwoJCQkgICAgdHJ5IAoJCQkgICAgeyBjb25mbGljdHM9Q29udHJvbGxlci5Db25mbGljdERhdGVzWydjZi0nK2tleV07IAoJCQkgICAgfSBjYXRjaCAoZXgpIHsgfQoJCQkgICAgdmFyIGNzcz1wYXJzZUludChyb3QpPj0wPydmb250LXdlaWdodDpib2xkOyc6Jyc7ICAKCQkJCSAKCQkJCWNvbmZsaWN0b3IuY29weSAoZG9tLkNvbmZsaWN0c1twXSk7CgkJCQljb25mbGljdG9yLmNvcHkgKHsKCQkJCSAgICAgICAgICAgICAgICAgICAgJ2tleScgCQk6IGtleSwgCgkJCQkgICAgICAgICAgICAgICAgICAgICdkYXRlJyAJCTogZGF0ZSwgCgkJCQkgICAgICAgICAgICAgICAgICAgICdjc3MnIAkJOiBjc3MsIAoJCQkJICAgICAgICAgICAgICAgICAgICAnc3RhcnR0aW1lJyA6IHN0YXJ0dGltZSwgCgkJCQkgICAgICAgICAgICAgICAgICAgICdlbmR0aW1lJyAJOiBlbmR0aW1lICwgCgkJCQkgICAgICAgICAgICAgICAgICAgICdpY29uJyAJCTogJycgLCAKCQkJCSAgICAgICAgICAgICAgICAgICAgJ2NvbmZsaWN0cycgOiAnJyAsC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gICAgICAgICAgCiAgICBpZiAod2luZG93Lmh0dHAucmVhZHlTdGF0ZSA9PSBSZWFkeVN0YXRlLkRPTkUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAgCiAgICAgICAgdmFyIGJ1dHRvbl9yb3dfdG9wID0gZnVuY3Rpb24oKQogICAgICAgIHsKCiAgICAgICAgICAgIHZhciBwZz0wOwogICAgICAgICAgICB2YXIgcGVuZD0wOyAKICAgICAgICAgICAgdmFyIGJyPScnOwogICAgICAgICAgICAKICAgICAgICAgICAgYnIgKz0gJzx0YWJsZSB3aWR0aD0iMTAwJSIgY2VsbHBhZGRpbmc9IjIiIGNlbGxzcGFjaW5nPSIwIj48dHI+JzsKICAgICAgICAgICAgYnIgKz0gJzx0ZD4nOwogICAgICAgICAgICBiciArPSBidXR0b25fcm93ICh0aGlzLmlkKTsgCiAgICAgICAgICAgIAogICAgICAgICAgICBpZiAod2luZG93Lmludm9pY2UuZXZlbnRzLmxlbmd0aCA+IDApCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGJyICs9ICcmbmJzcDtWaWV3IDxhIGhyZWY9ImphdmFzY3JpcHQ6dm9pZCgwKSIgb25jbGljaz0iSW52b2ljZVBhZ2VFdmVudC5pbnZva2UoKTsiPmludm9pY2U8L2E+JzsKICAgICAgICAgICAgfSAKICAgICAgICAgICAgCiAgICAgICAgICAgIGJyICs9ICc8L3RkPic7CiAgICAgICAgICAgIGJyICs9ICc8dGQgYWxpZ249cmlnaHQ+JzsKCQkJCgkJCXZhciBjb3VudCA9IHRoaXMucm93cy5sZW5ndGg7CgkJCXZhciBsaW1pdCA9IE1hdGgubWluKGNvdW50LCB0aGlzLnBhZ2VzaXplKTsKICAgICAgICAgICAgaWYgKHRoaXMucm93cy5sZW5ndGggPiB0aGlzLnBhZ2VzaXplKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBiciArPSAnICc7CiAgICAgICAgICAgICAgICBi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gICAgICAgICAgYnIgKz0gJzwvdHI+JzsKICAgICAgICAgICAgYnIgKz0gJzwvdGFibGU+JzsKICAgICAgICAgICAgCiAgICAgICAgICAgIHJldHVybiBiciArICBzZWxlY3Rfcm93OwogICAgICAgICAgICAKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgCiAgICAgICAgdmFyIGJ1dHRvbl9yb3dfYm90dG9tID0gZnVuY3Rpb24oKQogICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgIHZhciBicj0nJzsKICAgICAgICAgICAgYnIgKz0gJzx0YWJsZSB3aWR0aD0iMTAwJSIgY2VsbHBhZGRpbmc9IjIiIGNlbGxzcGFjaW5nPSIwIj48dHI+JzsKICAgICAgICAgICAgYnIgKz0gJzx0ZD4nOwogICAgICAgICAgICBiciArPSBidXR0b25fcm93ICh0aGlzLmlkKTsgCiAgICAgICAgICAgIGJyICs9ICc8L3RkPic7CiAgICAgICAgICAgIGJyICs9ICc8dGQgYWxpZ249cmlnaHQ+JzsgCiAgICAgICAgICAgIGJyICs9ICc8L3RkPic7CiAgICAgICAgICAgIGJyICs9ICc8L3RyPic7CiAgICAgICAgICAgIGJyICs9ICc8L3RhYmxlPic7CiAgICAgICAgICAgIAogICAgICAgICAgICByZXR1cm4gc2VsZWN0X3JvdyAgKyBicjsgCiAgICAgICAgfQogICAgICAgIAogICAgICAgIAogICAgICAgIHZhciBkPW5ldyBkZ3JpZCgpOwogICAgICAgIGQua2V5PSJlbGlzdHRhYmxlIjsKICAgICAgICBkLmhlYWRlcnRyYW5zZm9ybSA9IGJ1dHRvbl9yb3dfdG9wOwogICAgICAgIGQuZm9vdGVydHJhbnNmb3JtID0gYnV0dG9uX3Jvd19ib3R0b207CgkJZC5maXJzdHJvd3RyYW5zZm9ybSA9IGZ1bmN0aW9uICgpIHsJCgkJCXJldHVybiAnPHRyPjx0ZCBjb2xzcGFuPSI3IiBzdHlsZT0icGFkZGluZzoycHg7Y29sb3I6IzMzMztm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ZpZXc9PSdleHBhbmRlZCc7CiAgICAgICAgICAgIGlmICghcm93WydGZWF0dXJlZCddKSByb3dbJ0ZlYXR1cmVkJ109MDsKICAgICAgICAgICAgdmFyIG90aGVyPSAtKHJvd1snRmVhdHVyZWQnXS0xKTsKICAgICAgICAgICAgdmFyIGNvbW1lbnRzPXJvd1snQ29tbWVudHMnXTsKICAgICAgICAgICAgaWYgKCFjb21tZW50cykgY29tbWVudHM9Jyc7CiAgICAgICAgICAgIHZhciBjc3M9Y2hvc2VuPydibHVlcm93JzonZGF0YXJvdyc7IAogICAgICAgICAgICB2YXIgdGIscm93bWFzayA9IGNob3NlbiA/ICdFdmVudExpc3RTZWxlY3RlZFJvdycgOiAnRXZlbnRMaXN0Tm9ybWFsUm93JzsgCgkJCQoJCQlpZiAod2luZG93LnJlcG9ydCkKCQkJewoJCQkJcm93bWFzayA9IHdpbmRvdy5yZXBvcnRzW3dpbmRvdy5yZXBvcnRdLnRpdGxlICsgbmV3IERhdGUoKS5nZXRUaW1lKCk7CgkJCQlyZWdpc3RlclRlbXBsYXRlIChyb3dtYXNrLCAnPHRyPjx0ZD4nICsgd2luZG93LnJlcG9ydHNbd2luZG93LnJlcG9ydF0udGVtcGxhdGVib2R5LnJlcGxhY2UgKCc8cD4mbmJzcDs8L3A+JywnJykgKyAnPC90ZD48L3RyPicpOwoJCQl9CgkJCSAKCQkJIAogICAgICAgICAgICB2YXIgb2JqZWN0ID0geyAndGVtcGxhdGUnIDogcm93bWFzaywgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2hvcnRjb21tZW50JyA6IGNvbW1lbnRzLnN1YnN0cigwLDg1IC0gcm93LnJlKCdFdmVudE5hbWUnKS5sZW5ndGgpLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICdncmlkaWQnIDogdGhpcy5pZCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb3RoZXInIDogb3RoZXIsIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3N0YX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ICAgICAgIENvbnRyb2xsZXIuZXZlbnRsaXN0ID0gW107CiAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICBkLnRpdGxlPSJFdmVudCBMaXN0IjsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGY9bm9kZXNbMV0uY2hpbGROb2RlczsKICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGYubGVuZ3RoO2krKykKICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHsgZC5jb2x1bW5zLnB1c2ggKGZbaV0uZ2V0QXR0cmlidXRlICgnbicpKTsgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChleCkge30KICAgICAgICAgICAgICAgICAgICAgICAgfSAKICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciB4PTA7eDxub2Rlcy5sZW5ndGg7eCsrKQogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobm9kZXNbeF0ubm9kZU5hbWU9PSdyJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcm93PVtdOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGY9bm9kZXNbeF0uY2hpbGROb2RlczsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpPTA7aTxmLmxlbmd0aDtpKyspCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmM9ZltpXS5jaGlsZE5vZGVzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrPTA7azxmYy5sZW5ndGg7aysrKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3cucHVzaCAoIGZjW2tdLm5vZGVWYWx1ZSApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93WyBmW2ldLmdldEF0dHJpYnV0ZSAoJ24nKSBdID0gZmNba10ubm9kZVZhbHVlIDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCQkJCQkJCQlpZiAocm93LkN1c3RvbURhdGUpCgkJCQkJCQkJewoJCQkJCQkJCQlpZiAocm93LkV2ZW50U3RhcnRUaW1lKQoJCQkJCQkJCQl7CgkJCQkJCQkJCQl2YXIgZXhhY3RfdGltZT0gbmV3IERhdGUgKGRhdGVVUyhyb3cuQ3VzdG9tRGF0ZSkgKyAnICcgKyByb3cuRXZlbnRTdGFydFRpbWUpCgkJCQkJCQkJCQlpZiAoIWlzTmFOKGV4YWN0X3RpbWUpKQoJCQkJCQkJCQkJewoJCQkJCQkJCQkJCXJvdy5BY3R1YWxEYXRlYW5kVGltZSA9IGV4YWN0X3RpbWUuZ2V0VGltZSgpOwoJCQkJCQkJCQkJfQoJCQkJCQkJCQl9CgkJCQkJCQkJfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXIuZXZlbnRsaXN0LnB1c2ggKHJvdyk7IAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9IAogICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChDb250cm9sbGVyLlNvcnRGaWVsZCkgQ29udHJvbGxlci5ldmVudGxpc3Quc29ydCAoU29ydEV2ZW50Um93QnlOYW1lKTsKCQkJCQkJIGVsc2UKCQkJCQkJIHsKCQkJCQkJCSBDb250cm9sbGV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ArIHZpZXcpOwogICAgICAgICAgICByZXR1cm4gbGVuc2UgKCk7CiAgICAgICAgfSAgIAogICAgfSAgCgoKICAgIHZhciBkeD1nZXRFbGVtZW50ICgnZWxpc3R0YWJsZScpOwogICAgdmFyIGRjPWdldEVsZW1lbnQgKCdkY2VsaXN0dGFibGUnKTsKICAgIHZhciBkej1nZXRFbGVtZW50ICgnZGNhbCcpOwogICAgaWYgKGR6KWR6LnN0eWxlLmRpc3BsYXk9J25vbmUnOwogICAgaWYgKHdpbmRvdy5odHRwLnJlYWR5U3RhdGU9PVJlYWR5U3RhdGUuRE9ORSAmJiBDb250cm9sbGVyLlNpZGViYXJTdGF0ZT09MSkKICAgIHsKICAgICAgICBpZiAoZHopZHouc3R5bGUuZGlzcGxheT0naW5saW5lJzsKICAgIH0KICAgIHdpbmRvdy5yZXNpemVyLmNsZWFyICgpOwogICAgaWYgKGRjKQogICAgewogICAgICAgIGRjLmludm9rZSA9IGZ1bmN0aW9uICgpCiAgICAgICAgeyAKICAgICAgICAgICAgdGhpcy5zdHlsZS5oZWlnaHQgPSB3aW5kb3dfaCgpIC0gZG9jeSAodGhpcykgLSA2NTsKICAgICAgICAgICAgdGhpcy5zdHlsZS53aWR0aCA9IHdpbmRvd193KCkgLSAoQ29udHJvbGxlci5TaWRlYmFyU3RhdGU9PTE/MTc2OjIwKTsKICAgICAgICB9CiAgICAgICAgd2luZG93LnJlc2l6ZXIuc3Vic2NyaWJlIChkYyk7CiAgICAgICAgZGMuaW52b2tlKCk7CiAgICB9IAogICAgCiAgICB2YXIgZHggPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSAoIlNQQU4iKTsvLyBhbGVydCAoZHgubGVuZ3RoKQogICAgZm9yICh2YXIgeD0wO3g8ZHgubGVuZ3RoO3grKykKICAgIHsKICAgICAgICBpZiAoZHhbeF0uY2xhc3NOYW1lPT0nbWFnaWNzcGFuJykKICAgICAgICB7CiAgICAgICAgICAgIGR4W3hdLmludm9rZSA9IGZ1bmN0aW9uICgpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHZhciB3PXdpbmRvd193KCkgLSBkb2N4KHRoaXMpIC0gMjc1OwogICAgICAgICAgICAgICAgdmFyIGxlbiA9IHcvMTA7CiAgICAgICAgICAgICAgICBsZW4gPSBNYXRoLm1heCAobGVuLDEpOwogICAgICAgICAgICAgICAgdGhpcy5pbm5lckhUTUwgPSAnIC0gJyArIHRoaXMudGl0bGUuc3Vic3RyKDAsbGVuKSArICh0aGlzLnRpdGxlLmxlbmd0aCA+IGxlbiA/ICcuLi4nIDogJycpOwogICAgICAgICAgICAgICAgdGhpcy5zdHlsZS5jb2xvciA9ICcjNjY2JzsKICAgICAgICAgICAgfQogICAgICAgICAgICB3aW5kb3cucmVzaXplci5zdWJzY3JpYmUgKGR4W3hdKTsKICAgICAgICAgICAgZHhbeF0uaW52b2tlKCk7CiAgICAgICAgfQogICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBpZiAod2luZG93Lmh0dHAucmVhZHlTdGF0ZSA9PSBSZWFkeVN0YXRlLkRPTkUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgeyAgICAgICAKICAgICAgICBDaGVja0Zvck1haWxSZXF1ZXN0ICgpOyAKICAgIH0gICAgICAgICAgCiAgICB3aW5kb3cucmVzaXplci5pbnZva2UgKCk7Cn0KICAgCgpmdW5jdGlvbiBFdmVudERhdGFHcmlkU2VsZWN0IChncmlkaWQsIGV2ZW50aWQpICAKeyAgIAogICAgdmFyIGR3PWdldEVsZW1lbnQgKCdkd29ya3NwYWNlJyk7ICAgICAgCiAgICB2YXIgZGc9d2luZG93LmRhdGFncmlkc1tncmlkaWRdOyAgCiAgICBkZy5zZWxlY3RlZD1ldmVudGlkOyAgCiAgICBkdy5pbm5lckhUTUw9ZGcuZHJhdygpOyAgCiAgICBEZWJ1Z0V2ZW50RGF0YUdyaWQuYWZ0ZXJpbnZva2Ug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0vIDsKCQl2YXIgbW0gPSByZS5leGVjICh3aW5kb3cuaHR0cC5yZXNwb25zZVRleHQpOwoJCWlmIChDb250cm9sbGVyLmRvbUNsb25lKSB7IC8qZG8gbm90aGluZyovIH0KCQllbHNlIGlmIChtbSkgd2luZG93LmN1cnJlbnRldmVudC5JRCA9IHBhcnNlSW50KG1tWzFdKTsgCgkJQ29udHJvbGxlci5kb21DbG9uZSAJPSBudWxsOwoJCUNvbnRyb2xsZXIuc2luZ2xlX2VkaXQgCT0gbnVsbDsKICAgICAgICBMb2FkRXZlbnREZXRhaWxDdXN0b21Qcm9wZXJ0aWVzICgpOwoJfSAKfQog","bXZjLmludm9pY2UuanM="=>"77u/PCEtLS8vIEpTY3JpcHQgRmlsZQpmdW5jdGlvbiBJbnZvaWNlIChncmlkaWQpCnsKICAgIHRoaXMuZXZlbnRzICAgICA9IFtdOwogICAgdGhpcy5hZGRlZCAgICAgID0gW107CiAgICB0aGlzLmluZGV4ICAgICAgPSAtMTsKICAgIHRoaXMuY3VycmVudCAgICA9IG51bGw7CiAgICB0aGlzLml0ZW0gICAgICAgPSBudWxsOwogICAgdGhpcy5ncmlkaWQgICAgID0gZ3JpZGlkOwogICAgdGhpcy5jb3VudCAgICAgID0gMDsKICAgIHRoaXMucmVtb3ZlID0gZnVuY3Rpb24gKGlkKQogICAgewogICAgICAgIHZhciByZXN1bHQgPSBbXTsKICAgICAgICBmb3IgKHZhciB4IGluIHRoaXMuZXZlbnRzKQogICAgICAgIHsKICAgICAgICAgICAgaWYgKHRoaXMuZXZlbnRzW3hdLklEIT1pZCkgcmVzdWx0LnB1c2ggKHRoaXMuZXZlbnRzW3hdKTsgCiAgICAgICAgfQogICAgICAgIHRoaXMuZXZlbnRzID0gcmVzdWx0OwogICAgfQogICAgCiAgICB0aGlzLmZpbmQgPSBmdW5jdGlvbiAoaWQpCiAgICB7CiAgICAgICAgZm9yICh2YXIgeCBpbiB0aGlzLmV2ZW50cykKICAgICAgICB7CiAgICAgICAgICAgIGlmICh0aGlzLmV2ZW50c1t4XS5JRD09aWQpIHJldHVybiB0aGlzLmV2ZW50c1t4XTsgCiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KICAgIAogICAgdGhpcy5jbG9uZSA9IGZ1bmN0aW9uIChpZCwgeCkKICAgIHsKICAgICAgICB2YXIgZSA9IHRoaXMuZmluZChpZCk7CiAgICAgICAgZS5JbnZvaWNlRGlzcGxheURhdGVzPWJpdGUoZS5JbnZvaWNlRGlzcGxheURhdGVzLHgpOwogICAgICAgIENvbnRyb2xsZXIuUmVsb2FkKCdkY2VpdnRhYmxlJywnZHJvcGRvd25tZW51Jyk7IAogICAgfQogICAgCiAgICB0aGlzLmFkZCA9IGZ1bmN0aW9uICh4KQogICAgewogICAgICAgIHRoaXMuYWRkZWQgPSB4OwogICAgICAgIHRoaXMuY291bnQgPSB0aGlzLmFkZGVkLmxlbmd0aCA7CiAgICAgICAgdGhpcy5sb2FkICgpOwogICAgfQogICAgCiAgICB0aGlzLmxvYWQgPSBmdW5jdGlvbiAoKQogICAgewogICAgICAgIHZhciBpdGVtLCBDb25uZWN0b3I9W107CiAgICAgICAgd2hpbGUgKHRoaXMuYWRkZWQubGVuZ3RoID4gMCkKICAgICAgICB7CiAgICAgICAgICAgIGl0ZW0gPSBuZXcgRXZlbnRPYmplY3QoIHRoaXMuYWRkZWQucG9wKCkgKTsgIAogICAgICAgICAgICBDb25uZWN0b3IucHVzaCAoeyAKICAgICAgICAgICAgICAgICdwYXJhbXMnIDogeyAnYWN0aW9uJyA6ICdyYW5nZScsICdpZCcgOiBpdGVtLklEIH0sCiAgICAgICAgICAgICAgICAndGFyZ2V0JyA6IGl0ZW0uQ3VzdG9tRGF0ZXMsICAKICAgICAgICAgICAgICAgICdzZXJpYWxpemVyJyA6IEludm9pY2VDdXN0b21EYXRlU2VyaWFsaXplcgogICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIENvbm5lY3Rvci5wdXNoICh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ICAgIHsgICAKICAgICAgICB2YXIgdG1wID0gbnVsbDsKICAgICAgICB2YXIgZG1hc2sgPSAnJzsKICAgICAgICB2YXIgcmF0ZSA9IDA7CgogICAgICAgIAogICAgICAgIGZvciAodmFyIHUgaW4gcm93LkN1c3RvbVByb3BlcnRpZXMpIAoJICAgIHsgCgkJICAgIGlmIChyb3cuQ3VzdG9tUHJvcGVydGllc1t1XS5uYW1lPT0nUmF0ZScpIAoJCSAgICB7IAoJCQkgICAgcmF0ZT1yb3cuQ3VzdG9tUHJvcGVydGllc1t1XS52YWx1ZTsgCgkJCSAgICBicmVhazsgCgkJICAgIH0gCgkgICAgfSAgIAoJICAgIAogICAgICAgIGlmIChyb3cuSW52b2ljZURpc3BsYXlEYXRlcyA+IDApCiAgICAgICAgewogICAgICAgICAgICBmb3IgKHZhciB4PTA7eDxyb3cuQ3VzdG9tRGF0ZXMubGVuZ3RoO3grKykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaWYgKE1hdGgucG93KDIseCkgJiByb3cuSW52b2ljZURpc3BsYXlEYXRlcykgCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgdG1wID0gbmV3IEludm9pY2VSb3cgKHJvdywgcmF0ZSwgcm93LkN1c3RvbURhdGVzW3hdLnZhbHVlLCB0aGlzLmlkLCBNYXRoLnBvdygyLHgpKTsKICAgICAgICAgICAgICAgICAgICBkbWFzayArPSB0bXAuZHJhdyAoKTsgIAogICAgICAgICAgICAgICAgICAgIGQudG90YWwgKz0gdG1wLnRvdGFsOwogICAgICAgICAgICAgICAgfSAgCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgdG1wID0gbmV3IEludm9pY2VSb3cgKHJvdywgcmF0ZSwgcm93LkV2ZW50RGF0ZSwgdGhpcy5pZCwgZmFsc2UpOyAKICAgICAgICAgICAgZG1hc2sgKz0gdG1wLmRyYXcgKCk7IAogICAgICAgICAgICBkLnRvdGFsICs9IHRtcC50b3RhbDsKICAgICAgICB9IAogICAgICAgIAogICAgICAgIHJldHVybiBkbWFzazsKICAgIH0gIAogICAgCglkLnJvd3MgPSB3aW5kb3cuaW52b2ljZS5ldmVudHM7ICAKCQoJCiAgICBkb2N1bWVudC50aXRsZSA9IHdpbmRvdy5pbnZvaWNlLmV2ZW50cy5sZW5ndGggKyAnIGV2ZW50cyc7CiAgICAKCWQuY2VsbHBhZGRpbmc9IDI7IAogICAgcmV0dXJuIGQuZHJhdygpOyAKfQoKZnVuY3Rpb24gVG90YWxSb3cgKCApCnsKICAgIHRoaXMuaXN0b3RhbCA9IHRydWU7Cn0KCmZ1bmN0aW9uIEludm9pY2VSb3cgKHJvdywgcmF0ZSwgZGF0ZSwgZ3JpZCwgc3Via2V5KQp7CiAgICB0aGlzLnJvdyA9IHJvdzsKICAgIHRoaXMucmF0ZSA9IHJhdGU7CiAgICB0aGlzLmRhdGUgPSBkYXRlOwogICAgdGhpcy5ncmlkID0gZ3JpZDsKICAgIHRoaXMudG90YWwgPSAwOwogICAgCiAgICB0aGlzLmRyYXcgPSBmdW5jdGlvbiAoKQogICAgewoJCXZhciBjdXN0b20gPSBudWxsOwogICAgICAgIHZhciBhciwgbm0KICAgICAgICB0aGlzLnRvdGFsICA9IDA7CiAgICAgICAgdmFyIEZhY3RvcnkgPSB3aW5kb3cudGVtcGxhdGVzCiAgICAgICAgdmFyIGRtYXNrICAgPSAnJzsKICAgICAgICB2YXIgc3ViICAgICA9IHRoaXMucm93LkR1cmF0aW9uICogdGhpcy5yYXRlOyAgCiAgICAgICAgCiAgICAgICAgdmFyIG9uY2hlY2s7CiAgICAgICAgaWYgKHN1YmtleSkKICAgICAgICB7CiAgICAgICAgICAgIG9uY2hlY2sgPSAnICB3aW5kb3cuaW52b2ljZS5jbG9uZSAoJyArIHRoaXMucm93LklEICsgJywgJyArIHN1YmtleSArICcpOyAnOwogICAgICAgIH0gIAogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIG9uY2hlY2sgID0gJyAgaWYgKGNvbmZpcm0oXCdSZW1vdmUgaXRlbSBmcm9tIGludm9pY2U/XCcpKSAnOwogICAgICAgICAgICBvbmNoZWNrICs9ICcgIHsgd2luZG93Lmludm9pY2UucmVtb3ZlICgnICsgdGhpcy5yb3cuSUQgKyAnKTtDb250cm9sbGVyLlJlbG9hZCgpOyB9ICc7CiAgICAgICAgICAgIG9uY2hlY2sgKz0gJyBlbHNlIHRoaXMuY2hlY2tlZD10cnVlOyc7CiAgICAgICAgfQogICAgICAgIAogICAgICAgIHZhciBvYmplY3QgPSAgeyAnb25jaGVjaycgOiBvbmNoZWNrLCAKICAgICAgICAgICAgICAgICAgICAgICAgJ3RlbXBsYXRlJyA6ICdpbnZvaWNlX2V2ZW50X3JvdycsIAogICAgICAgICAgICAgICAgICAgICAgICAnc3R5bGUnIDogc3Via2V5ID8gImNvbG9yOiM2NjYiIDogKHRoaXMucm93LkN1c3RvbURhdGVzLmxlbmd0aCA+IDAgPyAnZm9udC13ZWlnaHQ6Ym9sZCcgOiAnY29sb3I6YmxhY2s7dGV4dC1kZWNvcmF0aW9uOm5vbmUnKSwgCiAgICAgICAgICAgICAgICAgICAgICAgICdvbmNsaWNrJyA6IHRoaXMucm93LkN1c3RvbURhdGVzLmxlbmd0aCA+IDAgPyAiQXR0YWNoSW52b2ljZURhdGVGb3JtICgnIiArIHRoaXMucm93LklEICsgIicsICciICsgdGhpcy5ncmlkICsgIicpIiA6ICIiLCAKICAgICAgICAgICAgICAgICAgICAgICAgJ2lkJyA6ICdpdi0nICsgdGhpcy5yb3cuSUQgKyAnJywgCiAgICAgICAgICAgICAgICAgICAgICAgICdsaW5rdGV4dCcgOiBkYXRlSW5wdXQgKCB0aGlzLmRhdGUgKSwgCiAgICAgICAgICAgICAgICAgICAgICAgICdldmVudG5hbWUnIDogdGhpcy5yb3cuRXZlbnROYW1lLCAKICAgICAgICAgICAgICAgICAgICAgICAgJ3JhdGUnIDogbnVtYmVyX2Zvcm1hdCggdGhpcy5yYXRlICksIAogICAgICAgICAgICAgICAgICAgICAgICAnZHVyYXRpb24nIDogbnVtYmVyX2Zvcm1hdCggdGhpcy5yb3cuRHVyYXRpb24gKSwgCiAgICAgICAgICAgICAgICAgICAgICAgICdzdWInIDogbnVtYmVyX2Zvcm1hdCggc3ViICkKICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgZG1hc2sgKz0gRmFjdG9yeS53cml0ZSAob2JqZWN0KTsgCiAgICAgICAgCiAgICAgICAgdGhpcy50b3RhbCArPSBzdWI7IAogICAgICAgIGZvciAodmFyIGsgaW4gdGhpcy5yb3cuQ3VzdG9tUHJvcGVydGllcykKICAgICAgICB7CiAgICAgICAgICAgIGN1c3RvbT10aGlzLnJvdy5DdXN0b21Qcm9wZXJ0aWVzW2tdOwoJCQlpZiAoY3VzdG9tLmVhY2ggJiYgcGFyc2VJbnQoIGN1c3RvbS5lYWNoICkgPiAwICYmIGN1c3RvbS52YWx1ZSAmJiB0eXBlb2YgKGN1c3RvbS52YWx1ZSkgIT0gJ3VuZGVmaW5lZCcgJiYgY3VzdG9tLnZhbHVlICE9ICd1bmRlZmluZWQnKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBhciA9IGN1c3RvbS52YWx1ZS5zcGxpdCAoJywnKQogICAgICAgICAgICAgICAgbm0gPSBHZXRDdXN0b21Qcm9wZXJ0eUJ5TmFtZShjdXN0b20ubmFtZSk7CiAgICAgICAgICAgICAgICBpZiAobm0pCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgdiBpbiBhcikKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdCA9ICB7ICd0ZW1wbGF0ZScgOiAnaW52b2ljZV9wcm9wZXJ0eV9yb3cnLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0wxJyA6IG5tLnR5cGVfbmFtZT09J251bWJlcicgPyAnJm5ic3A7JyA6IGN1c3RvbS5uYW1lLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0wyJyA6IG5tLnR5cGVfbmFtZT09J251bWJlcicgPyBjdXN0b20ubmFtZSA6IGFyW3ZdLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0wzJyA6IG51bWJlcl9mb3JtYXQgKCBjdXN0b20uZWFjaCApLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0w0JyA6IG5tLnR5cGVfbmFtZT09J251bWJlcicgPyBhclt2XSA6ICcmbmJzcDsnLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0w1JyA6IG51bWJlcl9mb3JtYXQoIG5tLnR5cGVfbmFtZT09J251bWJlcicgPyAoIGN1c3RvbS5lYWNoICogYXJbdl0gKSA6IGN1c3RvbS5lYWNoICkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgZG1hc2sgKz0gRmFjdG9yeS53cml0ZSAob2JqZWN0KTsgCiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG90YWwgKz0gcGFyc2VJbnQoIG9iamVjdC5MNSApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAKICAgICAgICByZXR1cm4gZG1hc2s7CiAgICB9Cn0KIAoKZnVuY3Rpb24gUHJvY2Vzc1Jlc2V0RXZlbnRJbnZvaWNlRGF0ZSAoKQp7ICAKICAgIGlmICh3aW5kb3cuaHR0cC5yZWFkeVN0YXRlPT1SZWFkeVN0YXRlLkRPTkUpICAgCiAgICB7ICAgIAoJICAgIEhpZGVUaW1lU2VsZWN0b3IoKTsgCiAgICAgICAgUmVsb2FkTGFzdExpc3RSZXF1ZXN0ICg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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3ZhbHVlJyA6IE1hdGgucG93KDIseCksIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sb3InIDogTWF0aC5wb3coMix4KSAmIHJvdy5JbnZvaWNlRGlzcGxheURhdGVzID8gJ2JsYWNrJyA6ICdibHVlJwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICB9ICAgCiAgICAgCiAgICAKCWRzLmlubmVySFRNTCAgICAgICAgPSBGYWN0b3J5LndyaXRlIChvYmplY3QpOyAKCWRzLnN0eWxlLmRpc3BsYXkgICAgPSAnaW5saW5lJzsgCglkcy5zdHlsZS5sZWZ0ICAgICAgID0gZG9jeCAoZHQpOwoJZHMuc3R5bGUudG9wICAgICAgICA9IGRvY3kgKGR0KSArIGR0Lm9mZnNldEhlaWdodCAtIHRiLnNjcm9sbFRvcDsKfSAKCgpmdW5jdGlvbiBudW1iZXJfZm9ybWF0ICh4KQp7CiAgICBpZiAoaXNOYU4oeCkpIHg9MDsKICAgIHZhciBkZWM9TWF0aC5yb3VuZCgxMDAgKiAoeC1NYXRoLmZsb29yKHgpKSk7CiAgICBpZiAoZGVjIDwgMTApIGRlYyA9ICcwJyArIGRlYzsKICAgIHJldHVybiBNYXRoLmZsb29yKHgpICsgJy4nICsgZGVjOwp9Cgp2YXIgSW52b2ljZURhdGVMaW5lID0gJyc7Ckludm9pY2VEYXRlTGluZSArPSAnICA8dHI+JzsKSW52b2ljZURhdGVMaW5lICs9ICcgICAgPHRkPjxhIHN0eWxlPSJjb2xvcjooY29sb3IpIiAnOwpJbnZvaWNlRGF0ZUxpbmUgKz0gJyAgICBocmVmPSJqYXZhc2NyaXB0OnZvaWQoMCkiIG9uY2xpY2s9IndpbmRvdy5pbnZvaWNlLmNsb25lICgoaWQpLCAodmFsdWUpKTsiJzsKSW52b2ljZURhdGVMaW5lICs9ICcgICAgPih0aXRsZSk8L2E+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0ZXh0ID0gcmVzcG9uc2UgfHwgd2luZG93Lmh0dHAucmVzcG9uc2VUZXh0OyAvL2NvbmZpcm0gKHRleHQpCiAgICAgICAgICAgIGlmICh3aW5kb3cuZG9tLmxvYWRYTUwgKHRleHQpKSAgCiAgICAgICAgICAgIHsgIAogICAgICAgICAgICAgICAgdmFyIHNpPW5ldyBTaW1wbGVYTUxJdGVyYXRvciAod2luZG93LmRvbSwgdGhpcy5yb3duYW1lLCB0aGlzLmNvbHVtbm5hbWUpOyAgIAogICAgICAgICAgICAgICAgaWYgKCF0aGlzLmNvbHVtbm5hbWUpIHNpLmZpZWxkbmFtZT1udWxsOwogICAgICAgICAgICAgICAgd2hpbGUgKCFzaS5lb2YpICAKICAgICAgICAgICAgICAgIHsgICAgICAKICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5zZXJpYWxpemVyKSB0aGlzLnNlcmlhbGl6ZXIgKCB0aGlzLnRhcmdldCwgc2kuZGF0YSApOwogICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMudGFyZ2V0KSB0aGlzLnRhcmdldC5wdXNoIChzaS5kYXRhKTsKICAgICAgICAgICAgICAgICAgICBzaS5tb3ZlbmV4dCAoKTsgIAogICAgICAgICAgICAgICAgfSAgIAogICAgICAgICAgICAgICAgdGhpcy5zZXJpYWxpemVyID0gbnVsbDsgIAogICAgICAgICAgICAgICAgLy8gdGhpcy5TYXZlU1FMZm9yVGVzdGluZyAoKTsgICAKICAgICAgICAgICAgfSAgCiAgICAgICAgICAgIGlmICghIHJlc3BvbnNlICkgQ29udHJvbGxlci5DbGVhcigpOyAKCgoKICAgICAgICAgICAgdHJ5IHsgaWYgKHRoaXMuYWZ0ZXJzZW5kKSB0aGlzLmFmdGVyc2VuZCAodGV4dCk7IH0gY2F0Y2ggKGV4KSB7IH0gCiAgICAgICAgfSAKICAgICAgICB0aGlzLm9ucmVjZWl2ZSAoKTsgICAgIAogICAgfQogICAgCiAgICB0aGlzLmNyZWF0ZVV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AgIAogICAgICAgICAgICAKICAgICAgICAgICAgdmFyIFJlcXVlc3RQYXJhbXMgPSB7ICAKICAgICAgICAgICAgICAgICdhZnRlcnNlbmQnIDogUmVMb2FkR2xvYmFsUm9vbXNMaXN0ICwKICAgICAgICAgICAgICAgICdtZXNzYWdlJyA6ICdSZWNlaXZpbmcgc2F2ZSByZXNwb25zZS4uLicsCiAgICAgICAgICAgICAgICAnbWV0aG9kJyA6ICdQT1NUJywKICAgICAgICAgICAgICAgICdwb3N0ZGF0YScgOiB4bWwKICAgICAgICAgICAgICAgICAgICAgIH07IAogICAgICAgICAgICB3aW5kb3cucmVxdWVzdC5jcmVhdGUgKFJlcXVlc3RQYXJhbXMpOyAgCiAgICAgICAgICAgICAgIAogICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICB9ICAKfQoKIApmdW5jdGlvbiBSb29tRHJvcGRvd24gKHBhcmVudGZrLCBzZWxlY3RlZCwgaW5kZW50KQp7CiAgICB2YXIgb2ssaHRtPScnLGtpZD1bXTsKICAgIGZvciAodmFyIHggaW4gd2luZG93LnJvb21zKQogICAgewogICAgICAgIGlmICh3aW5kb3cucm9vbXNbeF1bJ1Jvb21GayddPT1wYXJlbnRmaykKICAgICAgICB7IAogICAgICAgICAgICBvaz1wYXJzZUludChzZWxlY3RlZCwgMTApPT1wYXJzZUludCh3aW5kb3cucm9vbXNbeF1bJ0lEJ10sIDEwKTsKICAgICAgICAgICAgaHRtICs9ICc8b3B0aW9uIHZhbHVlPSInK3dpbmRvdy5yb29tc1t4XVsnSUQnXSsnIiAnKyhvaz8nc2VsZWN0ZWQnOicnKSsnPicKICAgICAgICAgICAgaHRtICs9IGluZGVudCArICcnCiAgICAgICAgICAgIGh0bSArPSAnJyArIHdpbmRvdy5yb29tc1t4XVsnUm9vbU5hbWUnXS5zdWJzdHIoMCw0MCkgKyAod2luZG93LnJvb21zW3hdWydSb29tTmFtZSddLmxlbmd0aD40MD8nLi4uJzonJyk7Ly8gKyAnLycgKyBzZWxlY3RlZCArICcvJyArIHdpbmRvdy5yb29tc1t4XVsnSUQnXSArICcvJyArIG9rOwogICAgICAgICAgICBodG0gKz0gJzwvb3B0aW9uPicgCgkJCWtpZC5wdXNoICh4KTsKICAgICAgICAgICAgaHRtICs9IFJvb21Ecm9wZG93biAod2luZG93LnJvb21zW3hdWydJRCddLCBzZWxlY3RlZCwgaW5kZW50ICsgJy4uLi4nKTsKICAgICAgICB9CiAgICB9IAoJCiAgICByZXR1cm4gaHRtOwp9CiAKIApmdW5jdGlvbiBSb29tQ2hlY2tMaXN0IChwYXJlbnRmaywgc2VsZWN0ZWQsIGluZGVudCkKewogICAgdmFyIGh0bT0nJzsKICAgIGZvciAodmFyIHggaW4gd2luZG93LnJvb21zKQogICAgewogICAgICAgIGlmICh3aW5kb3cucm9vbXNbeF1bJ1Jvb21GayddPT1wYXJlbnRmaykKICAgICAgICB7CiAgICAgICAgICAgIG9rPXNlbGVjdGVkLmluZGV4T2YgKCcsJyArIHdpbmRvdy5yb29tc1t4XVsnSUQnXSArICcsJyk+PTA7CgkJCWNzcz0nYmFja2dyb3VuZC1jb2xvcjonKyhvaz8nI0ZGRkYwMCc6J3doaXRlJykrJzsnOwogICAgICAgICAgICBodG0gKz0gJzx0cj48dGQgaWQ9InJjbCcreCsnIiBiZ2NvbG9yPSInKyhvaz8nI0ZGRkYwMCc6J3doaXRlJykrJyIgJwogICAgICAgICAgICBodG0gKz0gJyBub3dyYXAgc3R5bGU9ImZvbnQtc2l6ZTo4cHQ7Jytjc3MrJyIgY2xhc3M9ImRhdGFyb3ciPic7CiAgICAgICAgICAgIGh0bSArPSBpbmRlbnQgKyAnJzsKICAgICAgICAgICAgaHRtICs9ICc8aW5wdXQgdmFsdWU9Iicrd2luZG93LnJvb21zW3hdWydJRCddKyciICcgKyAob2s/JyBjaGVja2VkICc6JycpICsgJycKICAgICAgICAgICAgaHRtICs9ICcgaWQ9InJjaycreCsnIiBuYW1lPXJjayB0eXBlPSJjaGVja2JveCIgb25jbGljaz0iUm9vbUNoZWNrTGlzdFNlbGVjdCgnK3grJyx0aGlzLmNoZWNrZWQpIj4nCiAgICAgICAgICAgIGh0bSArPSAnPGxhYmVsIGZvcj0icmNrJyt4KyciIGlkPSJyY2InK3grJyIgc3R5bGU9IicrY3NzKydmb250LXdlaWdodDonKyhvaz8nYm9sZCc6J25vcm1hbCcpKyciPicKICAgICAgICAgICAgaHRtICs9ICcnICsgd2luZG93LnJvb21zW3hdWydSb29tTmFtZSddICsgJycKICAgICAgICAgICAgaHRtICs9ICc8L2xhYmVsPicKICAgICAgICAgICAgaHRtICs9ICc8YnI+JwogICAgICAgICAgICBodG0gKz0gJzwvdGQ+PC90cj4nOwogICAgICAgICAgICBodG0gKz0gUm9vbUNoZWNrTGlzdCAod2luZG93LnJvb21zW3hdWydJRCddLCBzZWxlY3RlZCwgaW5kZW50ICsgJy4uLi4nKTsKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gaHRtOwp9CiAKZnVuY3Rpb24gQ0xMYXVuY2hSb29tTGlzdERpYWxvZygpCnsKCXRoaXMuQ0xMYXVuY2hSb29tTGlzdERpYWxvZ0V4ID0gIExhdW5jaFJvb21MaXN0RGlhbG9nOwoJdGhpcy5DTExhdW5jaFJvb21MaXN0RGlhbG9nRXggKCdVcGxvYWRDbG9uZURhdGVMaXN0Jyk7Cn0KCmZ1bmN0aW9uIExhdW5jaFJvb21MaXN0RGlhbG9nIChjb21tYW5kKQp7ICAgCiAgICB2YXIgVG1wUm9vbXMgPSAnLCcsIG9uYz1jb21tYW5kfHwnVXBkYXRlRXZlbnRSb29tTGlzdCc7CiAgICBmb3IgKHZhciB4IGluIHRoaXMudGFyZ2V0KQogICAgeyAKICAgICAgIGlmICh0aGlzLnRhcmdldFt4XS5yb29tZmspIFRtcFJvb21zICs9IHRoaXMudGFyZ2V0W3hdLnJvb21mayArICcsJwogICAgfQogCiAgICB2YXIgaHRtID0gJyc7CiAgICBodG0gKz0gJzxodG1sPic7CiAgICBodG0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PSJib3JkZXItcmlnaHQ6c29saWQgMXB4ICNDQ0NDQ0M7cGFkZGluZzoxMHB4IiB2YWxpZ249InRvcCIgYWxpZ249InJpZ2h0Ij4gJzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICA8YnI+PGJyPjxicj48YnI+JzsKICAgIGh0bSs9JwkJPGltZyBzcmM9Ii93ZWJzZXJ2aWNlcy9pbWFnZXMvcG93ZXJlZGJ5Mi5naWYiIHN0eWxlPSJtYXJnaW46NHB4IiBib3JkZXI9IjAiIC8+JzsKICAgIGh0bSs9JyAgICAgICAgPGgyPlBsZWFzZSBsb2cgaW48L2gyPic7CiAgICBodG0rPScgICAgICAgIFdBUk5JTkc6IFRoaXMgaXMgYSBzZWN1cmUgYXJlYS4gWW91IG11c3QgbG9nIGluIGJlZm9yZSB5b3UgY2FuIGNvbnRpbnVlIHBhc3QgdGhpcyBwb2ludCc7CiAgICBodG0rPScgICAgICAgICAgICAgICAgPC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgIDx0ZCBub3dyYXA+ICc7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICA8dGFibGUgYWxpZ249ImNlbnRlciI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGFsaWduPSJyaWdodCIgbm93cmFwPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8Zm9udCBjb2xvcj0iIzgwODA4MCI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tRXZlbnRCdWlsZGVyICAtLT5Vc2VyIElEOic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2ZvbnQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBzaXplPSIzMCIgaWQ9InR4dFVzZXJJZCIgdmFsdWU9IiI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGFsaWduPSJyaWdodCI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxmb250IGNvbG9yPSIjODA4MDgwIj4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBhc3N3b3JkOic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2ZvbnQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBzaXplPSIzMCIgdHlwZT0icGFzc3dvcmQiIGlkPSJ0eHRVc2VyUGFzcyIgdmFsdWU9IiI+ICc7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPiAnOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPSJqYXZhc2NyaXB0OnZvaWQoMCkiIG9uY2xpY2s9InRvZ2dsZShcJ3Bhc3NJbmZvXCcpIic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+Rm9yZ290IHlvdXIgcGFzc3dvcmQ/PC9hPiAnOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxici8+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9InBhc3NJbmZvIiBzdHlsZT0iZGlzcGxheTpub25lIj4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW50ZXIgeW91ciBlbWFpbCBhZGRyZXNzOic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJyLz4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCTxpbnB1dCBzaXplPSIzMCIgaWQ9InBhc3NPb3BzIj4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJidXR0b24iIHZhbHVlPSJTZW5kIFBhc3N3b3JkIiBvbmNsaWNrPSJyZW1pbmQgKHBhc3NPb3BzLnZhbHVlKSI+ICAnOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+ICc7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD48L3RkPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBub3dyYXA+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxicj4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJyPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJja1JlbSI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlbWVtYmVyIG1lIG9uIHRoaXMgY29tcHV0ZXInOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJyPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJja1Bhc3MiPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZW1lbWJlciBteSBwYXNzd29yZCAnOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4gJzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPjwvdGQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIG5vd3JhcD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHZhbHVlPSJTaWduIGluIiBkaXNhYmxlZCBpZD0iYnNpZ25pbiInOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jbGljaz0ibG9naW4odHh0VXNlcklkLnZhbHVlLCB0eHRVc2VyUGFzcy52YWx1ZSxja1JlbS5jaGVja2VkPzE6MCxja1Bhc3MuY2hlY2tlZD8xOjApIiB0eXBlPSJidXR0b24iPic7CiAgICBodG0rPScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gaWQ9ImxvZ2luc3RhdHVzIiBzdHlsZT0iY29sb3I6cmVkO2ZvbnQ6Ym9sZCA4cHQgdGFob21hIj48L3NwYW4+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgIDwvdGFibGU+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICAgICAgPC90cj4nOwogICAgaHRtKz0nICAgICAgICAgICAgICAgIDwvdGFibGU+JzsKICAgIGh0bSs9JyAgICAgICAgICAgICAgICA8L3RkPic7CiAgICBodG0rPScgICAgICAgICAgICA8L3RyPic7CiAgICBodG0rPScgICAgICAgICAgICA8dHI+JzsKICAgIGh0bSs9JyAgICAgICAgICAgIDx0ZCBjb2xzcGFuPTIgYWxpZ249Y2VudGVyIHZhbGlnbj10b3AgaGVpZ2h0PTQwPic7CiAgICBodG0rPScgICAgICAgICAgICA8ZGl2IHN0eWxlPSJ3aWR0aDoyMDA7Ym9yZGVyOnNvbGlkIDFweCAjOTk5O2ZvbnQtc2l6ZTo4cHQ7cGFkZGluZzox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ybScgLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnIDogJ2NhdGVnb3J5JywgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb21tYW5kJyA6ICdDcmVhdGVDYXRlZ29yeScgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOyAgIAogICAgfQogICAgZC50cmFuc2Zvcm0gPSBmdW5jdGlvbiAocm93KQogICAgeyAKICAgICAgICB2YXIgb2s9cGFyc2VJbnQoQ29udHJvbGxlci5RdWVyeVN0cmluZ1snaWQnXSk9PXBhcnNlSW50KHJvd1snaWQnXSk7IAogICAgICAgIHZhciBvYmplY3QgPSB7ICd0ZW1wbGF0ZScgOiBvayA/ICdSZW5kZXJDYXRlZ29yeVNlbGVjdGVkUm93JyA6ICdSZW5kZXJDYXRlZ29yeU5vcm1hbFJvdycsICAKICAgICAgICAgICAgICAgICAgICAgICAgJ2dyaWRpZCcgOiB0aGlzLmlkIH0gIAogICAgICAgIGZvciAodmFyIHggaW4gcm93KSBvYmplY3RbeF09cm93W3hdOwogICAgICAgIHJldHVybiBGYWN0b3J5LndyaXRlIChvYmplY3QpOyAgCiAgICB9CglkLnNlbGVjdCA9IGZ1bmN0aW9uIChpKQoJewoJICAgIENvbnRyb2xsZXIuU2VsZWN0ZWRDYXRlZ29yeSA9IGk7CgkgICAgQ29udHJvbGxlci5SZWxvYWQgKCk7Cgl9CiAKCWQuY2VsbHBhZGRpbmc9IDI7CglkLnJvd3MgPSB3aW5kb3cuZm9sZGVyczsgCiAgICByZXR1cm4gZC5kcmF3KCk7IAp9CgoKUmVuZGVyU2V0dGluZ3NQYWdlLlJlbmRlclJlcG9ydCA9IGZ1bmN0aW9uICgpCnsgCgl2YXIgZD1uZXcgZGdyaWQoKTsKCWQua2V5PSJlcmVwb3J0dGFibGUiOwoJZC5zaG93YWxsID0gdHJ1ZTsgCglkLmVkaXRhYmxlID0gdHJ1ZTsgCglkLnNlbGVjdG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bWFuZCcgOiAnQ3JlYXRlQ2FsZW5kYXInICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7ICAKICAgIH0KICAgIGQudHJhbnNmb3JtID0gZnVuY3Rpb24gKHJvdykKICAgIHsgCiAgICAgICAgdmFyIG9rPXBhcnNlSW50KENvbnRyb2xsZXIuUXVlcnlTdHJpbmdbJ2lkJ10pPT1wYXJzZUludChyb3dbJ2lkJ10pOwogICAgICAgIAogICAgICAgIHZhciBvYmplY3QgPSB7ICd0ZW1wbGF0ZScgOiBvayA/ICdSZW5kZXJDYWxlbmRhclNlbGVjdGVkUm93JyA6ICdSZW5kZXJDYWxlbmRhck5vcm1hbFJvdycsICAKICAgICAgICAgICAgICAgICAgICAgICAgJ2NhbGVuZGFyX3ZpZXdfbmFtZScgOiBFdmVudENhbGVuZGFyLlZpZXdzW3Jvd1snY2FsZW5kYXJfdmlldyddXSwgIAogICAgICAgICAgICAgICAgICAgICAgICAnY2FsZW5kYXJfdmlld19saXN0JyA6IFRvb2xiYXIuc2VsZWN0b3IgKHsgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25jaGFuZ2UnIDogJ3dpbmRvdy5ldmVudGNhbGVuZGFyLnJldHlwZSh0aGlzLnZhbHVlKScsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb3JkaW5hbCcgOiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NlbGVjdGVkJyA6IHJvd1snY2FsZW5kYXJfdmlldyddLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbGxlY3Rpb24nIDogRXZlbnRDYWxlbmRhci5WaWV3cyAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSwKICAgICAgICAgICAgICAgICAgICAgICA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9yOiNlZWVlZWU7Y29sb3I6IzY2NiI7CiAgICBkLmhlYWRlcnRyYW5zZm9ybSA9IGZ1bmN0aW9uICgpCiAgICB7CiAgICAgICAgcmV0dXJuIEZhY3Rvcnkud3JpdGUgKHsgJ3RlbXBsYXRlJyA6ICdHZW5lcmFsQ3JlYXRlRm9ybScgLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ25hbWUnIDogJ2N1c3RvbSBwcm9wZXJ0eScsIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29tbWFuZCcgOiAnQ3JlYXRlUHJvcGVydHknICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7IAogICAgfQogICAgZC50cmFuc2Zvcm0gPSBmdW5jdGlvbiAocm93KQogICAgeyAJCQogICAgICAgIHZhciBvayA9IHBhcnNlSW50KENvbnRyb2xsZXIuUXVlcnlTdHJpbmdbJ2lkJ10pPT1wYXJzZUludChyb3cuaWQpOwoJICAgIHZhciBkcm9wZG93biA9IHsgCgkgICAgICAgICAgICAgICAgICAgICdpZCcgOiAnaXByb3BlcnR5X3R5cGUnLCAKCQkJCSAgICAgICAgJ2NvbGxlY3Rpb24nIDogd2luZG93LnByb3BlcnR5X3R5cGVzLCAgCgkJCQkgICAgICAgICdzZWxlY3RlZCcgOiByb3cucHJvcGVydHlfdHlwZSwgIAoJCQkJICAgICAgICAnbmFtZScgOiAndHlwZV9uYW1lJywgIAoJCQkJICAgICAgICAna2V5JyA6ICdpZCcKCQkJCSAgICAgICAgfTsgIAogICAgICAgIHZhciBvYmplY3QgPSB7ICd0ZW1wbGF0ZScgOiBvayA/ICdSZW5kZXJQcm9wZXJ0eVNlbGVjdGVkUm93JyA6ICdSZW5kZXJQcm9wZXJ0eU5vcm1hbFJvdycsICAKICAgICAgICAgICAgICAgICAgICAgICAgJ3Nob3J0bmFtZScgOiByb3cuZGlzcGxheV90ZXh0LnN1YnN0cigwLDUwKSArIChyb3cuZGlz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pdC5uYW1lcy5sZW5ndGg7eCsrKSBtYXNrICs9IGdldEVsZW1lbnQgKCdpTWFzaycreCkuY2hlY2tlZD9wYXJzZUludChnZXRFbGVtZW50ICgnaU1hc2snK3gpLnZhbHVlKTowOwovLyAgICAgICAgICAgIHdpbmRvdy51c2Vyc1twdF1bJ01hc2snXT1OdW1iZXIyQmluKG1hc2spOyAgCi8vICAgICAgICAgICAgIAovLyAgICAgICAgICAgIHZhciB1c2VyID0gbmV3IE1WQ1VzZXIgKHdpbmRvdy51c2Vyc1twdF0pOwovLyAgICAgICAgICAgIHVzZXIuc2F2ZSAoKTsgICAKLy8gICAgICAgICAgICBicmVhazsKLy8gICAgICAgIH0KLy8gICAgfSAKfSAKCk1WQ1VzZXIuZW1wdHkgPSBmdW5jdGlvbiAoZmlyc3RuYW1lLCBsYXN0bmFtZSkKeyAKICAgIHJldHVybiB7CiAgICAgICAgICAgICdJRCc6IDAsCiAgICAgICAgICAgICdTYWx1dGF0aW9uJyA6ICcnLAogICAgICAgICAgICAnRmlyc3ROYW1lJyA6ICcnLAogICAgICAgICAgICAnTGFzdE5hbWUnIDogJycsCiAgICAgICAgICAgICdUaXRsZScgOiAnJywKICAgICAgICAgICAgJ0VNYWlsJyA6ICcnLAogICAgICAgICAgICAnVXNlcklEJyA6ICcnLAogICAgICAgICAgICAnUGFzc3dvcmQnIDogJycsCiAgICAgICAgICAgICdQaG9uZScgOiAnJywKICAgICAgICAgICAgJ0FDTCcgOiAnMCcsCiAgICAgICAgICAgICdNYXNrJyA6ICcwMDAwMDAnIAogICAgICAgICAgICB9Owp9","cmVjb3JkZXIuanM="=>"77u/","eG1sZXh0cmFzLmpz"=>"77u/Ly8vLy8vLy8vLy8vLy8vLy8vCi8vIEhlbHBlciBTdHVmZiAvLwovLy8vLy8vLy8vLy8vLy8vLy8KCi8vIHVzZWQgdG8gZmluZCB0aGUgQXV0b21hdGlvbiBzZXJ2ZXIgbmFtZQpmdW5jdGlvbiBnZXREb21Eb2N1bW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ICAgICA8dGFibGUgd2lkdGg9IjMyMCIgaGVpZ2h0PSIyNDAiIGNlbGxwYWRkaW5nPTEwIGJnY29sb3I9IiNGRkZGRkYiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCB2YWxpZ249InRvcCIgYWxpZ249ImxlZnQiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAk8aW1nIHNyYz0iL3dlYnNlcnZpY2VzL2ltYWdlcy9zaGllbGRfcmVkLmdpZiIgYWxpZ249ImxlZnQiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1lc3NhZ2UpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPSJkaXNwbGF5Om5vbmUiIGlkPSJ0ZG1vcmUiIHZhbGlnbj0idG9wIiBhbGlnbj0iY2VudGVyIiBoZWlnaHQ9Mj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tPGhyIG5vc2hhZGUvPi0tPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZXh0YXJlYSBzdHlsZT0id2lkdGg6NDAwO2hlaWdodDoyMDA7Ym9yZGVyOmluc2V0IDFweDtvdmVyZmxvdzphdXRvO2ZvbnQtZmFtaWx5OidsdWNpZGEgY29uc29sZSc7Y29sb3I6IzY2NiI+PGNuOm1vcmVpbmZvIC8+PC90ZXh0YXJlYT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgdmF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bGljayB0aGUgJ1NlbmQnIGJ1dHRvbi4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgPlRvCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgd2lkdGg9IjQ1MCI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHNpemU9IjUwIiB2YWx1ZT0iKHRvKSIgbmFtZT0ibWFpbHRvIi8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkID5TdWJqZWN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgd2lkdGg9IjQ1MCI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHNpemU9IjUwIiB2YWx1ZT0iKHN1YmplY3QpIiBuYW1lPSJtYWlsdG8iLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgPk1lc3NhZ2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCB3aWR0aD0iNDUwIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRleHRhcmVhIG5hbWU9IiIgY29scz0iNDUiIHJvd3M9IjEwIj4obWVzc2FnZSk8L3RleHRhcmVhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBjb2xzcGFuPSIyIiB2YWxpZ249InRvcCIgYWxpZ249ImNlbnRlciIgaGVpZ2h0PTI0PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAk8aW5wdXQgb25jbGljaz0iIiB0eXBlPSJidXR0b24iIHZhbHVlPSJTZW5kIiAvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAk8aW5wdXQgb25jbGljaz0iQ2xvc2VXaW5kb3dBbGVydCAoKSIgdHlwZT0iYnV0dG9uIiB2YWx1ZT0iQ2FuY2VsIiAvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPiAKICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgPC90YWJsZT4KICAgICAgICA8L3RkPgogICAgPC90cj4KPC90YWJsZT4KPC9kaXY+CgoKPC9ib2R5Pgo8L2h0bWw+Cg==","ZHJvcGRvd24uaHRt"=>"77u/PGh0bWwgeG1sbnM6Y249Imh0dHA6Ly93d3cuMTAxc3RyYXRmb3JkLmNvbS93ZWJzZXJ2aWNlcy8iPgogPGhlYWQ+CiA8dGl0bGU+RHJvcGRvd24gbWVudSB0ZW1wbGF0ZTwvdGl0bGU+CjwvaGVhZD4gCiAgICA8Ym9keT4KICAgICAgICAgPGRpdiBzdHlsZT0iYm9yZGVyOnNvbGlkIDFweDtib3JkZXItY29sb3I6I2ZmZiAjNjY2IC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nZSB2YXJjaGFyKDEwMCkgIE5VTEwgICAsRGlzcGxheUNhbGVuZGFyIHRpbnlpbnQoNCkgIE5VTEwgICApCg==','RFJPUCBUQUJMRSBJRiBFWElTVFMgdXNlcnMg','Q1JFQVRFIFRBQkxFIHVzZXJzIChpZCBpbnQoMTEpICBOT1QgTlVMTCAgYXV0b19pbmNyZW1lbnQgIFBSSU1BUlkgS0VZICxmbmFtZSB2YXJjaGFyKDI1NSkgIE5VTEwgICAsbG5hbWUgdmFyY2hhcigyNTUpICBOVUxMICAgLHVuYW1lIHZhcmNoYXIoMjU1KSAgTlVMTCAgICxwd29yZCB2YXJjaGFyKDI1NSkgIE5VTEwgICAsZW1haWwgdmFyY2hhcigyNTUpICBOVUxMICAgKQo=','RFJPUCBUQUJMRSBJRiBFWElTVFMgd29ya3N0YXRpb25zIA==','Q1JFQVRFIFRBQkxFIHdvcmtzdGF0aW9ucyAoSUQgaW50KDQpICBOT1QgTlVMTCAgYXV0b19pbmNyZW1lbnQgIFBSSU1BUlkgS0VZICxTdGF0aW9uTmFtZSB2YXJjaGFyKDEwMCkgIE5VTEwgICAsSVBBZGRyZXNzIHZhcmNoYXIoMjApICBOVUxMICAgLERpc3BsYXlDYWxlbmRhciB0aW55aW50KDQpICBOVUxMICAgLFJlZnJlc2hSYXRlIGludCg0KSAgTlVMTCAgICxSZWZyZXNoVGltZSBpbnQoNCkgIE5VTEwgICApCg==');function v($x){return base64_decode($x);};$foo=array ('ZXZlbnRfdXNlcnM='=>'SU5TRVJUIElOVE8gZXZlbnRfdXNlcnMNCihNYXNrLCBGaXJzdE5hbWUsIExhc3ROYW1lLCBVc2VySUQsIFBhc3N3b3JkKQ0KVkFMVUVTDQooJzExMTExMScsJ2FkbWluJywndXNlcicsJ2FkbWluJywndXNlcicp','cm9vbXM='=>'SU5TRVJUIElOVE8gcm9vbXMgKFJvb21OYW1lLENvbW1lbnRzLFJvb21GaykNClZBTFVFUyAoJ01haW4gTG9iYnknLCdFbnRlciBjb21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PTkZJRyIsICRpbnN0YWxsZGlyIC4gImViLWNvbmZpZy50eHQiKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKJGRhdGFiYXNlCT0gIiI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKJHNlcnZlcgkJPSAiIiA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokdXNlcgkJPSAiIjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAokcGFzc3dvcmQJPSAiIiA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmZ1bmN0aW9uIGdlbmVyaWNfZGF0YSgkc2VydmVyLCR1c2VyLCRwYXNzd29yZCwkZGF0YWJhc2UsJHF1ZXJ5KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgZ2xvYmFsICRmYXRhbDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIC8qIEFjY2Vzc2luZyBTUUwtU2VydmVyIGFuZCBxdWVyeWluZyB0YWJsZSAqLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIE1ZU1FMX0NPTk5FQ1QoJHNlcnZlciwgJHVzZXIsICRwYXNzd29yZCkgb3IgZGllICggJGZhdGFsLiIgU2VydmVyICRzZXJ2ZXIgdW5yZWFjaGFibGUgJHVzZXIvJHBhc3N3b3JkIiApOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgTVlTUUxfU0VMRUNUX0RCKCRkYXRhYmFzZSkgb3IgZGllICggJGZhdGFsLiIgRGF0YWJhc2UgdW5yZWFjaGFibGUiICk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICRyZXN1bHQgPSBATVlTUUxfUVVFUlkoc3RyaXBzbGFzaGVzKCRxdWVyeSkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIGlmICgkcmVzdWx0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgIHByaW50ICgiPGVycm9yPjwhW0NEQVRBWzx4bXA+PGltZyBzcmM9J2h0dHA6Ly93d3cuY3liZXI4Lm5ldC93ZWJzZXJ2aWNlcy9pbWFnZXMvZXhwbG9yZXIvZXhjbGFtYXRpb24uZ2lmJyBhbGlnbj10b3A+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICA8Yj5BIGZhdGFsIE15U1FMIGVycm9yIG9jY3VyZWQ8L2I+LlxuPGJyIC8+UXVlcnk6PHhtcD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAiIC4gJHF1ZXJ5IC4gIjwveG1wPjxiciAvPlxuRXJyb3I6ICgiIC4gbXlzcWxfZXJybm8oKSAuICIpIDx4bXA+IiAuIG15c3FsX2Vycm9yKCkgLiAiPC94bXA+PGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgPEEgSFJFRj0namF2YXNjcmlwdDpoaXN0b3J5LmJhY2soKSc+UGxlYXNlIHRyeSBhZ2FpbjwvQT5dXT48L2Vycm9yPiIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgTVlTUUxfQ0xPU0UoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICBleGl0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAkcmVzdWx0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBNWVNRTF9DTE9TRSgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCgpmdW5jdGlvbiBmb3JtX2RhdGFiYXNlX3F1ZXJ5KCRxdWVyeSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIGdsb2JhbCAkc2VydmVyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICBnbG9iYWwgJHVzZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIGdsb2JhbCAkcGFzc3dvcmQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgIGdsb2JhbCAkZGF0YWJhc2U7ICAgICAgCiAvLyAgZWNobyAnPGJyPignIC4gJGRhdGFiYXNlIC4gJyk8YnI+JzsKICAgJGZwPWZvcGVuIChHTE9CQUxfQ09ORklHLCdyJyk7CiAgICRmcj1mcmVhZCAoJGZwLCBmaWxlc2l6ZShHTE9CQUxfQ09ORklHKSk7CiAgIGZjbG9zZSAoJGZwKTsKICAgZm9yZWFjaCAoZXhwbG9kZSAoIlxuIiwkZnIpIGFzICRsaW5lKQogICB7CgkJcGFyc2Vfc3RyKCRsaW5lKTsgCiAgIH0KICAgJHNlcnZlciAJCT0gJGNvbmZpZyBbJ3NlcnZlciddOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgJHVzZXIgCQk9ICRjb25maWcgWyd1c2VyJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAkcGFzc3dvcmQgCT0gJGNvbmZpZyBbJ3Bhc3N3b3JkJ107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAkZGF0YWJhc2UJPSAkY29uZmlnIFsnZGF0YWJhc2UnXTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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